Hi Thierry,

I've built a custom content management framework based on Pyramid; it's a
> classic web application, based on ZODB and RelStorage with a PostgreSQL
> backend, a Redis cache and an Elasticsearch index, and I'm actually looking
> for the best production deployment option.
> Until now, I always used Apache with mod_wsgi, and I'm actually quite
> happy with it, but I'd like to know if there is a better option with better
> performance!
> In development mode, I already tried using "native" Waitress server, a
> GUnicorn server, and I just tried using Pypy with Waitress or GUnicorn but
> performances were quite "disappointing"!
>

I have been running Pyramid behind Apache, Nginx reverse proxies with
mod_wsgi, Uwsgi and plenty of other options. I am currently running
Cloudflare + Caddy + Waitress combination.

- Cloudflare is the easiest CDN for static media files, making JS and CSS
load an order of magnitude faster if they were served from my web server
- Caddy is way simpler to configure than Apache or Nginx, especially want
comes to HTTPS, but still quite performant
- Waitress is good enough and it is headache-free, unlike uWSGI or mod_wsgi
- 99% times the performance penalty does not depend on the web server
components, but the Python application itself. There is no meaningful
performance differences between web servers until you start to do dozens of
requests per second.

The architecture I am running is overviewed here:
https://tradingstrategy.ai/blog/building-cryptocurrency-website

Here is the Caddy configuration for Waitress reverse proxy:
https://github.com/tradingstrategy-ai/proxy-server/blob/master/Caddyfile#L29

Best regards,
Mikko

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pylons-discuss/CAK8RCUv5a1m7i%2BGv%2BCyKND8mC3sxFm5o6RVSOGw%3DK6upRANWsw%40mail.gmail.com.

Reply via email to