who's WE Server can support 50 WE user run smoothly :(

Greg, is their any examples of how to check for X rows and then send them back to the browser in chunks as I am struggling to see how to do this? I get the thread bit and have that working but not sure how I know when their is data to push back to the browser and how do you then push a bit and then a bit more etc?

Read from the database and stuff into an array. In the timer, read from the beginning and remove rows as you use them.

Thanks Greg, that is very clever and I will be using that in my new web project for a client I am start to build on Monday.

[quote=102396:@Robert Bednar]My apps typically have a small number of users, but uptime is paramount so I host the app on multiple servers. I have several small utility apps hosted on each server so I’ve not been too concerned with trying to load balance an app…but I have to wonder…how do normally do this? Sure I can start several instances of my app… but they can’t all be listening on the same port number right? So to run four instances…I’d need to have compiled my app for four different port numbers (assuming stand-alone deployment) .
Don’t know how could guarantee that the program would run on a different core each time (except that starting the app on a core makes it more likely a different core will be selected for the next core…but that’s not a given right?[/quote]

I have done a decent amount of testing on this with good results. I don’t know what your level of Linux administration experience is, but the tools required to pull this off with success are readily available. I have been using haproxy, running on CentOS with standalone apps. I start multiple instances of the apps on different port numbers using UpStart. UpStart will re-start processes if they fail, auto start them on runtime and allows you to start/stop all instances with a single command, helpful when updating. Supposedly UpStart is being replaced with something else in CentOS 7 but it is standard in 6.

Here is a blog post on the subject

Here and Here are some related forum discussions.

I tried both nginx and haproxy - haproxy works best because it is easier to inject a cookie to keep a user connected to the same instance of your app, which is needed to maintain the session. nginx can also do this, but it requires re-building with a module.

I use this kind of setup daily - let me know if this helps or if you have another question.

John