Load Balancer
Why they are important:
- Preventing requests from going to unhealthy servers
- Evenly distributing requests between application servers
- Eliminating single point of failure
- Session persistence- store request ids and cookies and route user requests to the same instance, can store information server side if client-side does not store
Routing Algorithms Used
- Random routing
- Last loaded- which server was the most recently used and then go down the priority list
- Round-Robin scheduling
Advantages
Load Balancers help with horizontal scaling efforts
Disadvantages
Introduces complexity as you have to clone multiple servers
Load balancer itself could serve as the single point of failure if not configured properly
Reverse Proxy Server
Server which serves as a public endpoint which hides any private endpoints of an application
User requests are fulfilled after the proxy server routes it to the correct application server and then the proxy server returns the response to the client instead of the application server
Benefits
- Increased scalabilty- because the client only sees the proxy, scaling backend servers are not as difficult
- Increased security if this is a concern for the application, can limit number of connections to the application from a single client
Disadvantages
- Adding a proxy server increases complexity of the system