CDP:Multi Load Balancer Pattern
Setting Up Multiple Load Balancers
Problem to Be Solved
When a web application is multi-device compatible, there will be access from PCs, mobile phones, and smart phones. At this time, if it is necessary to perform set up such as for SSL or to assign sessions for individual access devices, then if the setup is performed by the EC2 instances themselves, any change to the settings would become extremely laborious as the number of servers increases.
Explanation of the Cloud Solution/Pattern
In groups of virtual servers, you can solve this problem by assigning multiple virtual load balancers with different settings. That is, rather than modifying the servers, you can change the behavior relative to access by the different devices by changing the virtual load balancer for routing the access. For example, you can apply this to settings such as for sessions, health checks, HTTPS, and so forth.
Assign multiple virtual load balancers, known as "Elastic Load Balancers" (ELBs), to a single EC2 instance. You can use the SSL Termination function of the ELB to perform the HTTPS (SSL) process.
- Place an EC2 instance under the control of the ELBs.
- Prepare ELBs with different settings for sessions, health checks, HTTPS, and the like, and switch between them for the same EC2 instance.
- The behavior (on the load balancer level) for mobile sites and PC sites can be different, even when using the same EC2 instance.
- Even when multiple SSLs (HTTPS) are used by the same EC2 instance, you can prepare ELBs for each SSL (HTTP).
- Note that when you cut off an EC2 instance from an ELB to perform maintenance, for example, you have to cut off the EC2 instance from all of the ELBs.
- When you use the SSL Termination function of an ELB, the EC2 instance side will be able to receive requests via HTTP, making it difficult to evaluate the HTTPS connection by the applications.
See the Multi-Server Pattern.