Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon Jul 11, 2011 6:10 am 
Offline
Senior Newbie

Joined: Mon Jul 11, 2011 2:12 am
Posts: 7
Hi all

I have a strange problem with Nginx.

As long as I only have 2 frontend nodes all is fine and Nginx will toggle between the 2. If I decide to add another node then the toggling stops and only 1 node is hit and used. From the loadbalancer node I can curl (192.xxx.xxx.xxx:80) the local private IPs of the frontend nodes so they are reachable. I can also ping them.

Anyone who knows why Nginx behaves like this?


Top
   
 Post subject:
PostPosted: Mon Jul 11, 2011 4:58 pm 
Offline
Senior Newbie

Joined: Mon Jul 11, 2011 2:12 am
Posts: 7
It seems to be a problem with caching. The server where the loadbalancer resides must be caching a page I guess... strange I have really not noticed before. I can see the data fetched from DB (set and get on the same page request) is not renewed but old data shown.

If I type different chars after ? in the url I get new data so the caching is avoided.

Am I not right in assuming the it must be the loadbalancer that caches the result?


Top
   
 Post subject:
PostPosted: Tue Jul 12, 2011 9:40 am 
Offline
Senior Newbie

Joined: Mon Jul 11, 2011 2:12 am
Posts: 7
I have a correction as to the caching comment. I installed Varnish as loadbalancer to see if the problem persisted and it did - and with Varnish pages also got cached (even the db fetch did not happen) and only if adding ?newsign could I remove caching eg the different nodes was all used and db fetch happened.

With Nginx db fetches are done so no caching there only the Round Robin logic do not happen. Again if applying ?newsign the Round Robin logic is working.

Any help will be greatly appreciated


Top
   
 Post subject:
PostPosted: Wed Jul 13, 2011 9:29 pm 
Offline
Junior Member

Joined: Mon May 24, 2010 6:39 pm
Posts: 20
Check that your browser isn't the one caching them ;)


Top
   
 Post subject:
PostPosted: Thu Jul 14, 2011 2:32 am 
Offline
Senior Member

Joined: Sat May 03, 2008 4:01 pm
Posts: 569
Website: http://www.mattnordhoff.com/
Not to sound like an advertisement, but you might want to check out Linode's new managed load balancer service, NodeBalancer instead of doing it yourself.

_________________
Matt Nordhoff (aka Peng on IRC)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group