Implement a load-balancing solution capable of horizontally scaling services while ensuring high availability and efficient distribution of traffic
Networking
A Virtual IP (VIP) should be assigned to the load balancer so it can route incoming requests to the appropriate backend service.
Multiple servers (or nodes) will be required to host the service so load can be distributed evenly.
The intended request flow is: Client Request → DNS → Load Balancer → Server
Images
Network FlowNetwork Flow
Security
This environment is intended for a service that only I should have access to. For that reason, the following security requirements must be met:
Read and write access must be restricted exclusively to me.
Remote access from outside the LAN must be supported.
All traffic should be securely encrypted (e.g., via HTTPS).
The internal private IP address must remain hidden from external networks.
So what I've got configured is a Cloudflare tunnel with security policies enabled, in my case only a single email can access the service.
The first time anyone would try to access the service via subdomain.domain.org, it will ask for ~Cloudflare credentials which is just configured with policy.
Images
Zero TrustSecure Tunnel ConnectionMFA Token
Testing
Check external network can connect to the service
Block access to restricted users, which is everyone
Check that the load balancer is distributing load equally
Images
Trusted computer connected via LTE
Outcome
Everything is working as expected, the service i'm running is unfortunately not able to run in a load balancer due to using sqlite database and I don't have any other self-hosted services currently
The load balancer itself is working and via a virtual IP the kuma service is being routed, I will setup a separate service to get a better represenatation of the results.
Professional Experience
Currently I have no experience working with load balancers professionally