Search code examples
javaservletsyoutrackxodus

How does Jetbrains YouTrack server scales over load?


If Youtrack uses Xodus as the underlying database then how can YouTrack handle scalability?

  1. Xodus write lock system prevents scalability of application built with the database (see: Remove lock on environment at every transaction end and https://youtrack.jetbrains.com/issue/XD-807)

In a typical Java server environment, when the server encounters more load, it spawns new processes of the same application (typically); this is where Xodus breaks since it's lock mechanism is always bound to the first process that used or accessed the environment.

So how does YouTrack, in general, get around this limitation and be able to work as a production web application?


Solution

  • When it comes to scalability, the are two main design approaches to consider. Vertical scalability assumes that a single-node application can scale up with more CPU and more RAM added. Horizontal scalability, on the contrary, relies on multiple copies of the same application to handle the load. There's a great answer that goes into more details on both approaches. Although it uses database servers as an example, it is equally applicable to the most application types one can encounter today.

    Horizontally scalable applications may seem more typical these days, as they are generally easier to implement. Any kind of a critical issue with your code, like a race condition, is likely to bring down a single node only. So this approach is a bit more forgiving to the programming errors we all make at times.

    Xodus write lock system prevents scalability of application built with the database

    Now it should be clear, that Xodus architecture disallows horizontally scalable solutions only. Vertically scalable applications in turn are perfectly fine with it. This also answers your question about YouTrack. It scales in a vertical manner and is quite good at it.