Run Axon Server on Kubernetes or Virtual Machines?

Running applications built with Axon Framework on Kubernetes is a no-brainer, but is Kubernetes a good choice for running Axon Server with the wide choice of deployment options and environments available, andwhat factors do you need to consider when deploying Axon Server?

Whether you’re developing a greenfield event-driven microservices application or you’re taking your existing monolithic application and "strangling" it into one, Axon Framework paired with Axon Server works well together to handle both scenarios.

CQRS Replay Performance Tuning

Command Query Responsibility Segregation (CQRS) has become a popular pattern to avoid complex and, therefore, slow database queries in applications. With CQRS, queries are served from dedicated read models that are optimized for the query’s specific needs. This ensures that queries are as simple as possible and, therefore, as fast as possible. The read models need to be initialized and kept up to date with the primary storage (the command side). This is done most easily if the primary storage is event-based: the Event Sourcing (ES) concept. Axon offers a mature and popular implementation of the CQRS/ES concepts on the JVM, but several other implementations exist.

On the one hand, CQRS/ES presents a solution to a common performance problem. On the other hand, it introduces a couple of new potential performance challenges. First, the event store may not be able to deal efficiently with the number of events being stored. If the events are kept in a regular relational database table, performance will severely degrade once it grows to the point where the indices can’t be buffered in RAM. This is when built-for-purpose event stores like Axon Server can come to the rescue.