Skip to content

Introduce CloudFlare Load Balancer for Backend Services #2454

Description

@SB2318

Description

Introduce a load balancer in front of the backend services to distribute incoming traffic across multiple backend instances.

This will prepare the application for horizontal scaling as the number of users and API traffic increases.

Proposed Architecture

                 Load Balancer
                      |
          +-----------+-----------+
          |           |           |
       Backend #1  Backend #2  Backend #3

Tasks

  • Evaluate and select a suitable load-balancing solution.
  • Configure the load balancer for the backend.
  • Configure backend instances behind the load balancer.
  • Add health checks for backend instances.
  • Configure traffic distribution.
  • Ensure backend services remain stateless.
  • Configure appropriate timeout and connection settings.
  • Verify that traffic is distributed correctly.
  • Test backend instance failure and recovery.
  • Document the deployment and configuration.

Acceptance Criteria

  • Requests are successfully routed through the load balancer.
  • Multiple backend instances can serve traffic.
  • Unhealthy instances are automatically removed from traffic.
  • Healthy instances automatically receive traffic again after recovery.
  • Existing API functionality continues to work.
  • Load-balancing behavior is documented.

Expected Benefits

  • Horizontal backend scaling
  • Improved availability
  • Better traffic distribution
  • Easier addition/removal of backend instances
  • Improved readiness for higher user traffic

Related

This should be implemented alongside backend horizontal scaling.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions