Code Monkey home page Code Monkey logo

Comments (3)

timabbott avatar timabbott commented on June 24, 2024

Yeah, we haven't written up documentation on scalability stuff. The short story is:

(1) You can scale to a pretty large installation (O(~1000) concurrently active users using it to chat all day) with just a single reasonably large server sitting mostly idle for each of the frontend and database. I highly recommend SSD for the database (though I do that for any database), and having the frontend be a different server from the database (config for this is in puppet/zulip_internal and zproject/local_settings.py).

(2) If you're hosting multiple realms on the same server like we do with zulip.com, you can scale horizontally without any real code changes by adding additional frontends -- two frontends only need to talk to each other if they have users that exchange messages.

(3) Some code changes are required in order to make multiple frontend servers host the same Zulip realm. There are two issues: you need a shared memcached (should be easy to move that to a network service shared by multiple servers) and the Tornado event system for pushing to browsers currently has no mechanism for multiple frontend servers talking to each other. One can probably get a factor of 10 by just making it multiprocess on a single server; I have an old branch from working on this problem that I can make available if someone is interested in seriously working on this problem. Probably a week or two's work by someone with the right context to resolve these constraints.

(4) For reasonably high availability right now, it's easy to run a hot spare frontend server.

(5) If you have a very large realm (more than a few thousand users), some work will likely need to be done on the buddy list perf and UI to work nicely in that environment.

(6) The database load per user is pretty optimized and thus inexpensive, so I don't think you'll need multiple database masters unless below 10K users actually chatting all day (which can mean a lot more users in a realm!). There's config for streaming replication postgres slaves and pulling backups from those in puppet/zulip_internal.

I'm happy to expand more on this if you (or anyone else) still has questions! I think this thread can form the basis for an answer to live under docs/ in the codebase.

from zulip.

tural-ali avatar tural-ali commented on June 24, 2024

@timabbott I'd want we to discuss these things in live discussion. I invited you, Sir. https://gitter.im/turalsprofile/zulip?utm_source=share-link&utm_medium=link&utm_campaign=share-link

from zulip.

timabbott avatar timabbott commented on June 24, 2024

This is now covered in https://github.com/zulip/zulip/blob/master/README.prod.md#scalability-of-zulip

from zulip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.