Thursday, May 16, 2013

Load Balancer

I finally have something that I can test to see if it will work.

Some background. I started down the road using LVS. I have some luck if we were going to be using it for internal load balancing only. But as soon as I wanted to have the virtual IP become public and web machines private I ran into issues. Because of the traffic we get using net-masking wasn't an option. I still would have had to solve the HTTPS issue but that was for another day. All my tests failed when I moved to a public-private configuration. I tried a variety of tutorials that I found online but I was unable to find any that either explained it in enough detail that I could alter it to meet my needs or didn't even approach my situation.

Then after waiting a couple of weeks and looking at it again I was doing some additional searching and the end of the day I ran across a program called Pound that seemed promising. But didn't have time to do anything more than read the tutorial. It looked like it would do everything I needed. Now I am a little skeptical that it would work as things rarely work out that well. The next morning I started implementing the solution. I deleted my current virtual machines, they didn't work anyway, and started over. Within a couple of hours I have a first load balancer up and appeared to be working. Then I went looking for a tutorial on implementing fail over with Pound. It recommended keepalive. So I set that up and the second load balancer. Then pointed to a couple of our existing servers and started testing. Internal HTTP first....Success. Internal HTTPS next....Success. External HTTP.....Success. And finally External HTTPS....success. Needless to say I am stoked. All pieces seem to be working properly. Now I need to figure out some bench marking to see what it can handle as well as test the fail over. If they work then wow what a relief it will be to have something working.

Now I need to find the time to actually implement it into production so that the real world can prove how well it will work. Assuming it does will be a great help.

If learn anything new I will post it in another post.

Getting Started

Okay here I go. I guess it is time for me to start to contribute to the community that has helped me so much. I am a software engineer and have learned a lot by reading others blogs and tutorials.

I was one of the lucky ones that was able to start when I was young; forever ago. Many, many years later I am happy and grateful for the job I have and what I am able to do. My parents realized that I enjoyed computers so they found a book and set up a challenge where I would compete with my mother on who could get through it faster. I was excited to beat her. However I still had a bed time of 8PM so I thought it was unfair but wasn't going to let that get me down. I would do what I could then go to bed and was excited to see what my mom had done when I got up. After a week or so they let me get ahead. I learned later on that mom barely remembers doing it and only did it because of the interest that I had in it. I am grateful to my parents for fostering that which I loved and am able to make a living off of.

After that brief history on to seeing if I can contribute. I guess this post to be more about my philosophy about software engineering so that those who read it can get a sense of where my posts come from.

  1. Use the best tool you have for the job. This is probably the most fundamental belief that I follow.
  2. Languages are not good or bad they just are. Good coders write good code and bad coders write bad code.
  3. Don't write 20 lines of code when 10 will do the trick. More lines of code mean more chances of failure and normally slower.
  4. Learn something new every day. Don't be content with what you know. There is always something new out there to learn.
This is by no means a complete list but a good starting point.