Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to develop a web application that is load-balance friendly

Starting to develop to actual code to my website and wanted to know how do i develop or design the website that is load balance friendly. I read a post on stackoverflow regarding scalability and the selected answer stated: "Make sure you consider load balancing when developing your application". How do I go about this?

like image 479
Luke101 Avatar asked Nov 01 '10 17:11

Luke101


People also ask

How load balancing is implemented in web application?

Load balancing may be transparent if a specialized device is between the client and server. Or the communication protocol needs to support connection redirects. Edit: Load balancing can be implemented by DNS round robin too. Each DNS lookup call returns another IP address for the same domain name.

What is a load balancer web app?

What is Application Load Balancer? The Application Load Balancer is a feature of Elastic Load Balancing that allows a developer to configure and route incoming end-user traffic to applications based in the AWS public cloud. In a cloud environment with multiple web services, load balancing is essential.


1 Answers

Your decision will come down to environment. If this is a product for sale, you will not have any control over the load balancing implementation. This means that "sticky sessions," where a user is bound to the same server for the duration of a session, cannot be guaranteed. Sticky sessions allow just about any application to be load-balanced, but they are not as efficient.

If you cannot guarantee an implementation with sticky sessions, avoid the usage of Session state altogether, or look into a shared-session solution.

like image 158
Dave Swersky Avatar answered Oct 29 '22 16:10

Dave Swersky