Friday, July 3, 2015

Deploy Odoo with Load Balancer in Amazon Web Services(AWS) Cloud

We, Pragmatic has leveraged on the power of Amazon Web Services for Odoo deployment for state of art and automated load balancing that meets effective and efficient resource utilization requirement of a high performing enterprise system.

 Conventional Odoo Deployment on AWS
Figure 1: Single Server Approach in AWS – Conventional

Overcome Odoo management challenges with Pragmatic approach
Odoo Challenges/ Bottleneck: The bottleneck in Odoo direct implementation on AWS is scaling and load balancing based on incoming traffic. The automation and deployment in a scaling environment would be best suiting the optimal usage of resources and highly pocket friendly. When load on Odoo server is not managed the system can get into a stalemate or impasse which needs to be overcome by releasing connections and server management through manual intervention.
Pragmatic has used Elastic Load Balancing (ELB) along with AWS EC2, in an optimized way to achieve this resilience (with loose-coupling and Enterprise Postgre for advanced implementations) when loads would be soaring.

Scaling Odoo with Multi server Multi Process
Pragmatic uses ‘Multi server Multi Process’ approach to achieve Scaling and Load balancing
Figure 2: Multi-Server with Load Balancing – High Scalability and Elasticity
What Is Elastic Load Balancing?
Elastic Load Balancing automatically distributes incoming traffic across multiple EC2 instances. You create a load balancer and register instances with the load balancer in one or more Availability Zones.

The load balancer serves as a single point of contact for all clients of the Odoo installation. This enables to increase the availability of Odoo across the user spectrum. We can add and remove EC2 instances from the load balancer as the needs change, without disrupting the overall flow of information.

Fail over
If an EC2 instance fails, Elastic Load Balancing automatically reroutes the traffic to the remaining running EC2 instances. If a failed EC2 instance is restored, Elastic Load Balancing restores the traffic to that instance.

Security
Elastic Load Balancing can also serve as the first line of defense against attacks on your network. You can offload the work of encryption and decryption to your load balancer so that your EC2 instances can focus on their main work.

Auto Scaling
Ensures that you are running the desired number of Odoo instances, even if an instance fails, and enables you to automatically increase or decrease the number of instances as the demand on the instances changes. If Auto Scaling is enabled with Elastic Load Balancing, instances that are launched by Auto Scaling are automatically registered with the load balancer, and instances that are terminated by Auto Scaling are automatically de-registered from the load balancer.

Features of Elastic Load Balancing
High Availability
You can distribute incoming traffic across your Amazon EC2 instances in a single Availability Zone or multiple Availability Zones. Elastic Load Balancing automatically scales its request handling capacity in response to incoming Odoo traffic.

Health Checks
Elastic Load Balancing can detect the health of Amazon EC2 instances. When it detects unhealthy Amazon EC2 instances, it no longer routes traffic to those instances and spreads the load across the remaining healthy instances.

Security Features
When using Virtual Private Cloud (VPC), you can create and manage security groups associated with Elastic Load Balancing to provide additional networking and security options. You can also create a load balancer without public IP addresses to serve as an internal (non-internet-facing) load balancer.

SSL Offloading
Elastic Load Balancing supports SSL termination at the load balancer, including offloading SSL decryption from Odoo instances, centralized management of SSL certificates, and encryption to back-end instances with optional public key authentication.
Flexible cipher support allows you to control the ciphers and protocols the load balancer presents to clients.

Sticky Sessions
Elastic Load Balancing supports the ability to stick user sessions to specific EC2 instances using cookies. Traffic will be routed to the same instances as the user continues to access your Odoo.

IPv6 Support
Elastic Load Balancing supports the use of both the Internet Protocol version 4 and 6 (IPv4 and IPv6). IPv6 support is currently unavailable for use in VPC.

Layer 4 or Layer 7 Load Balancing
You can load balance HTTP/HTTPS based Odoo instances and use layer 7-specific features, such as X-Forwarded and sticky sessions. You can also use strict layer 4 load balancing for Odoo instances that rely purely on the TCP protocol.

Operational Monitoring
Elastic Load Balancing metrics such as request count and request latency are reported by Amazon CloudWatch.

Logging
Use the Access Logs feature to record all requests sent to your load balancer, and store the logs in Amazon S3 for later analysis. The logs are useful for diagnosing Odoo failures and analyzing web traffic. You can use AWS Cloudtrail to record Elastic Load Balancing API calls for your account and deliver log files. The API call history enables you to perform security analysis, resource change tracking, and compliance auditing.

No comments:

Post a Comment