Hi!
I know it's been a while since the first question was asked, but as we encounter a problem with Nginx and load balancing, we prefer to post our question on a topic related to this subject.
So... We deployed two canvas applications on two different physical servers. They both use the same database (a postgresql one), same redis, same delayed jobs, same S3 bucket. All their configurations are identical. We managed to make the load balancing work on our Nginx server and it was redirecting to one server or the other.
But! We encounter a strange behavior: it seems that sometimes some pages were not fully loading, such as the calendar, discussions, people... (in fact pages that involve an ajax request, apparently). Sometimes the page were loading correctly sometimes they were not.
I tried to study the logs, no errors appeared while I was browsing those pages. I also tried to use both applications by directly accessing them using their "ip:port" address, and everything worked fine, even for the pages that were not loading.
I did not find any errors anywhere... Did someone have the same problem when using load balancing with Nginx?
Also... as we store our files on amazon S3, do we still need to "share" the tmp folder across our applications?
Did we miss some configurations? We used the same one as Christopher Benell but added
ip_hash to the upstream module. Was it a bad idea?
I am ready to give any information needed to help me find the solution to this strange problem. Also I'm ready to write a how to on load balancing as soon as mine is working.
Thanks!