Image 01 Image 02

User profile

Estado:
Nombre: Sameer
Nickname:
Miembro desde: 2008-08-18 06:46:08
URL: http://
Sobre mi:
 

User comments

Load Balancing with Nginx

You are missing the server block within the http section. If you look above you need both upstream and server. Upstream defines a set of hosts that requests will be passed to. But you still need the server block to define which requests are passed to which upstream. What I’ve written in the original post, I believe, is exactly what you are looking for.

Load Balancing with Nginx

Okay first both apache and nginx default to listen on port 80. Since you are using nginx as your frontend you want the experience to be seamless for users, so you keep nginx on 80 and you set apache to listen to another port. This assumes that nginx and apache are running on the same server and listening on the same ip. If not you don’t have to mess with port settings. So, anyway, setting nginx as port 80 allows people to visit your site via http://www.mysite.com instead of http://www.mysite.com:8080/

Yes it makes sense to comment out that block of code. As for the rest, I’m not quite sure if your syntax is valid. But heres how I would do it…

So lets say you have nginx running on 000.20.86.000 on port 80 and you have apache running on port 8080 on 000.20.86.000, 000.20.87.000, and 000.20.88.000. This is how your nginx configuration file should look.

upstream mysite  {
   server 000.20.86.000:8080; # ts-www0
   server 000.20.87.000:8080; # ts-www1
   server 000.20.88.000:8080; # ts-www2
}

server {
   listen 80;
   server_name http://www.mysite.com;
   location / {
      proxy_pass  http://mysite;
   }
}

And this is how apache should look (also remember to change it to listen on port 8080 instead of 80): I’m using brackets instead of arrows since wordpress seems to be choking on the arrows.

NameVirtualHost 000.20.86.000:8080
{VirtualHost 000.20.86.000:8080}
        DocumentRoot /path/to/site
        ServerName http://www.mysite.com
{/VirtualHost}

Elgg Scalability

Sorry, I have not looked into the new release yet. Once I do, I will come up with a followup post

Tokyo Tyrant with PHP

According to the documentation, Tokyo Tyrant supports atomic increment so it should work.

Tokyo Tyrant with PHP

Ben, I tested it for you and both increment/decrement and multi-get work.

And, true about the google suggestion. It is something I plan to write more about in the future.