Multi-Zope

From Zenoss Wiki
This is the approved revision of this page, as well as being the most recent.
Jump to: navigation, search

Important Note

For Zenoss Resource Manager 4.1.1 and later, these tips are not necessary. As of Version 4.1.1, Resource Manager had these capabilities native with ZenWebServer, a command line front end to an NGINX load balancer that allows administrators to add or remove Zope instances on the fly.

Business Case

In larger environments, especially those with many concurrent users, the ZenOSS web UI is often sluggish and can become unresponsive during certain operations. The purpose of running more than one Zope is to reduce the potential impact of any individual Zope which has stopped servicing web requests.

Theory

Why is Zope slow? There's two main reasons:

  • GIL (Global Interpreter Lock)
  • Synchronous methods

Patching Zope

Notify your users that the ZenOSS web UI will be down during the procedure.

On the ZenOSS master, `su zenoss` then `zopectl stop`.

Download the multipzope.patch patch file from https://github.com/Hackman238/Random/blob/master/multiplezope.patch. Apply it using the patch command as the zenoss user.

Edit the $ZENHOME/bin/zopectl and modify the 'ZOPES=' parameter to equal the number of zopes you wish to start.

As the zenoss user, issue `zopectl start`. Note that the zopes are started, restarted and stopped by the zopectl in a serial manner.

Each Zope will service requests on it's own port based on port 8080 + (1000 * i) where i is the zope number.

Consider tuning your Zope.

Load balancing

CORE

https://github.com/Hackman238/Random/blob/master

Enterprise

See ZenPack:WebScale