Setup Details

  1. Create two Application Load Balancers, Internet facing ELB and internal ELB. Enable Stickiness on both load balancing target groups (see instructions on how to enable Stickiness here).

  2. PrivX admin and users will use the PrivX website URL (e.g. privx.example.com), which is a CNAME record pointing to AWS Internet ELB DNS name.

  3. AWS Internet ELB directs https traffic to a specific PrivX application EC2 instance.

  4. Under AWS Route 53, create a private hosted zone for domain example.com and create a CNAME record set for privx.example.com pointing to internal ELB DNS name.

  5. Internal ELB directs https traffic from PrivX-Carrier and PrivX-Web-Proxy to PrivX application EC2 instance.

  6. PrivX-Extender in VPC2 will use Internet ELB if there’s no VPC peering in use. If VPC peering is configured, PrivX-Extender is not required.

Application Load Balancer Components

A load balancer serves as the single point of contact for clients. The load balancer distributes incoming application traffic across multiple targets, such as EC2 instances, in multiple Availability Zones. This increases the availability of your application. You add one or more listeners to your load balancer.

Target Groups for Your Application Load Balancers

Each target group is used to route requests to one or more registered targets. When you create each listener rule, you specify a target group and conditions. When a rule condition is met, traffic is forwarded to the corresponding target group. You can create different target groups for different types of requests. For example, create one target group for general requests and other target groups for requests to the microservices for your application.

Sticky Sessions

Sticky sessions are a mechanism to route requests to the same target in a target group. This is useful for servers that maintain state information in order to provide a continuous experience to clients. To use sticky sessions, the clients must support cookies.