Load Balancers

testgrinder service will be discontinued on January 31, 2025

testgrinder SMPC was discontinued as of February 1, 2024

testgrinder uses two load balances - one, public, for requests arriving from outside of the testgrinder VPC and the other, internal, for communicating with tg-bots.

You can manage load balances on the Load Balancers page in AWS EC2 console at https://console.aws.amazon.com/ec2

Public Load Balancer

You will setup a public load balancer that will handle requests for testgrinder coming from the outside of the testgrinder VPC.

Elastic IP Addresses

The public load balancer will be mapped to all testgrinder VPC subnets with one (at least) subnet being assigned an Elastic IP address (rather than assigning an EIP directly to a tg-app instance). It is recommended but not required to allocate and assign an EIP address to each mapping. Make sure the EIP(s) are allocated and configured in your DNS server for the testgrinder domain name before creating the public load balancer.

Create Public Load Balancer

  1. Visit the Load Balancers page in AWS EC2 console

  2. Click Create load balancer

  3. Click Create under Network Load Balancer

  4. In Basic configuration:

    1. Give the balancer a name, e.g. tg-prod-app-public

    2. Scheme: Internet-facing

    3. IP address type: IPv4

  5. Network mapping:

    1. VPC: choose testgrinder VPC

    2. Mappings: select all availability zones

      1. Assign an EIP address to one of the zones, ideally assign an EIP address to each

        1. Note: you cannot assign the same EIP to several availability zones, choose t

      2. Make sure your DNS maps the testgrinder domain name to the EIP(s)

  6. Listeners and routing:

    1. Listener: TCP:22

      1. Protocol: TCP

      2. Port: 22

      3. Forward to: tg-prod-app-public-ssh target group

    2. Listener: TCP:80

      1. Protocol: TCP

      2. Port: 80

      3. Forward to: tg-prod-app-public-http target group

    3. Listener: TCP: 443

      1. Protocol: TCP

      2. Port: 443

      3. Forward to: tg-prod-app-public-https target group

  7. Click Create load balancer

  8. Enable cross-zone load balancing

    1. Select the load balance you just created, click Actions, and choose Edit load balancer attributes

    2. In Target selection configuration make sure:

      1. Cross-zone load balancing: enabled

    3. Click Save changes

Internal Load Balancer

  • Visit the Load Balancers page in AWS EC2 console

  • Click Create load balancer

  • Click Create under Network Load Balancer

  • In Basic configuration:

    1. Give the balancer a name, e.g. tg-prod-app-internal

    2. Scheme: Internal

    3. IP address type: IPv4

  • Network mapping:

    1. VPC: choose testgrinder VPC

    2. Mappings: select all availability zones

      1. Ignore the warning: Your internal load balancer must have a private subnet

  • Listeners and routing:

    1. Listener: TCP:3000

      1. Protocol: TCP

      2. Port: 3000

      3. Forward to: tg-prod-app-private-bot target group

  • Click Create load balancer

  • Enable cross-zone load balancing

    1. Select the load balance you just created, click Actions, and choose Edit load balancer attributes

    2. In Target selection configuration make sure:

      1. Cross-zone load balancing: enabled

    3. Click Save changes

Last updated