This is very good advice. I have moved many of my plugins and apps from 
using models to modules because of the performance gain. There is nothing 
wrong with the models implementation, but it's really meant to define 
tables and that's it. Functionality that doesn't belong in a controller 
should go to modules.

Some other advice that I have been gathering for my own deployments is to 
use Nginx instead of Apache. You will see an incredible increase in the 
number of requests per second that Nginx can handle over Apache. Also 
setting up an Nginx front-facing server that is proxying requests to 
another server running Nginx + web2py might be a good idea for lots of 
traffic. Have the front-facing server handle the SSL traffic, and maybe 
even enable caching on the front-end as well. When you need to add another 
server to handle increased traffic, this front-facing Nginx server can be 
configured to load balance so that you can scale as much as you need.

Reply via email to