How to deploy with Load Balancer?

I am trying to understand load balancing. Seems like the system allows you to balance traffic over a number of independent servers… correct? So, given that, what is the best practice for deploying identical code to multiple servers simultaneously?

Thanks for any input.

Matt.

2 Replies

There's three major goals when making a multi-instance system:

1) Deploy each instance correctly.

2) Make sure the instance's software and configuration stays correct.

3) Keep each instance informed of changes to the rest of the system topology that impact it.

The first can be as simple as cloning a "gold master" instance every time you need a new one, but that starts sucking when it gets out of date (and when you have more than a handful of different instance types). Building a StackScript or using something like fabric to automate initial deployment is better.

As far as ongoing maintenance goes, my favorite tool for #2 and #3 is currently Chef.

Other things of paramount importance:

1) Thou shall maintain your code, templates, and other such assets in a version control system (e.g. SVN, git, hg, …).

2) Thou shall think about your data and where it shall live, and what shall happen if that home goes away suddenly.

3) Thou shalt not design distributed single points of failure.

4) Thou shall recall that PHP is a vulgar language, and those that spake forth its blasphemous trills tend not to think in the object-oriented and modular forms which indeed make many things easier, and the use of the PHP here will lead thee to the inherent problems of excessive consumption of the fermented vine and grass-fruit.

… that last one might be editorializing a bit, but the important point is that your application's limits and assumptions will have to be considered when designing a system, too!

Very helpful, thanks! That is just what I was looking for.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct