0

I have a low load website having on the average 1000 visitors per day. It is roughly estimated to reach to 10,000 (or even 20K) users on daily basis in 6 months or so. But I still consider that to be a low traffic CMS web site.

Everything is hosted on a single (CentOS VM) server of 8 gig ram and 4-cores CPU (which I may increase to 16G/8-cores).

Currently we have a setup as:

Nginx -> Varnish -> HAProxy -> CMS_HTTP_Daemons X 2 -> 1 DB Daemon -> SDD Disk

Since Varnish can also act as a simple round robin load balancer, I am planning to remove the HAProxy from middle; and since in my given scenario nginx is doing nothing other than proxy_pass, I am also thinking to remove this piece of software from the chain to make the setup like:

Varnish (WebServer+LB+HTTPCache) -> CMS_HTTP_Daemons X 2 -> 1 DB Daemon -> SDD Disk

Is it recommended or does this seems to be a good idea?

By the way my CMS is Zeo/Plone and database is ZopeDB.

hB0
  • 111
  • 5

3 Answers3

1

One alternative would be to set up load balancing / caching in nginx and have only nginx and CMS HTTP daemons running.

However, I don't know about the differences in nginx / Varnish caching performance.

Tero Kilkanen
  • 34,499
  • 3
  • 38
  • 58
  • Thanks for the suggestion, I have already considered it but Varnish caching is super fast using only RAM (non-persistent) - and I would want to keep it. – hB0 Jul 06 '17 at 08:03
1

We use both varnish -> haproxy -> plone and nginx -> varnish -> haproxy -> plone.

I think you can get varnish to do everything, but I'm not sure it buys you much. You would have to spend time reconfiguring and testing. Those processes don't use much CPU or RAM. For rewrites, we do it in the CMS, so nginx isn't needed for that.

With your size server I'd be running at 4 zope servers, possibly with 2 threads each. If you really worry about traffic spikes you can set the caching so pages and folders are cached in varnish for 1-5 min. Then your setup could handle a LOT of load (assuming you don't have popular forms, apps embedded in it).

Cory Knutson
  • 1,866
  • 12
  • 20
Dylan Jay
  • 11
  • 1
  • I decided to follow strategy bit similar to yours. nginx -> varnish -> plone (zope client) * X procs * 2 threads per process -> zope db (daemon) -> db-filesystem. -- Although I did not receive the answer to my question(s) but your suggestions are closer than any other answers so I give it a useful flag but not marked as an answer. – hB0 Jul 12 '17 at 08:51
0

Have you looked at https://docs.plone.org/manage/deploying/index.html ?

Usually nginx is used to rewrite URLs. Varnish is good for caching. For low load sites HAProxy might indeed not be necessary.

Consider posting Plone related questions in the Plone forum. I've posted a link to your question there, at https://community.plone.org/t/stack-overflow-varnish-as-a-simple-forwarding-web-server/4489

  • Thanks for cross posting. Since we do not need explicit URL rewrite (I suppose adding IPAddr/websitename could be achievable via Varnish as well) and not any other feature by nginx that is why I'm thinking to possibly remove it. I (may) refer to this plone based setup https://docs.plone.org/4/en/manage/deploying/stack.html – hB0 Jul 04 '17 at 22:32
  • Plus I do not consider this specific to plone but to varnish.. – hB0 Jul 05 '17 at 01:05