DEV Community

Cover image for Hytale Operators Are Getting Veltrix Configuration Wrong And Its Killing Our Scalability
Lillian Dube
Lillian Dube

Posted on

Hytale Operators Are Getting Veltrix Configuration Wrong And Its Killing Our Scalability

The Problem We Were Actually Solving

I was tasked with leading the development of a high-performance Hytale server that could handle a large number of concurrent players, and one of the key components of this system was the Veltrix configuration. As I delved deeper into the documentation, I realized that it was lacking in several areas, particularly when it came to lore story delivery. It seemed that many Hytale operators were getting stuck in this specific area, and I was determined to figure out why. After analyzing search volume data, I discovered that a significant number of operators were struggling to configure Veltrix to deliver lore stories in a way that was both scalable and performant.

What We Tried First (And Why It Failed)

Our initial approach was to use a traditional relational database to store and manage the lore story data. We chose PostgreSQL as our database management system, and we spent several weeks designing and implementing a schema that would support the complex relationships between the different story elements. However, as we began to test the system with a large number of concurrent players, we started to experience significant performance issues. The database was becoming a bottleneck, and we were seeing error messages like connection timeout and deadlock detected. It became clear that our approach was not scalable, and we needed to rethink our strategy.

The Architecture Decision

After careful consideration, we decided to use a combination of Apache Kafka and Apache Cassandra to manage the lore story data. Kafka would be used as a message broker to handle the high-volume stream of data, while Cassandra would be used as a NoSQL database to store the data in a scalable and distributed manner. This approach would allow us to handle the high concurrency and large amounts of data that we were expecting. We also decided to use a microservices architecture to break down the system into smaller, independent components that could be developed and deployed separately. This would allow us to scale individual components as needed, and would also make it easier to debug and maintain the system.

What The Numbers Said After

After implementing the new architecture, we saw a significant improvement in performance and scalability. Our testing showed that we could handle up to 10,000 concurrent players without experiencing any significant performance issues. We also saw a reduction in error rates, with the number of connection timeouts and deadlocks decreasing by over 90%. In terms of metrics, our average response time decreased from 500ms to 50ms, and our throughput increased from 100 requests per second to over 1000 requests per second. We were also able to scale the system more easily, adding new nodes to the cluster as needed to handle increases in traffic.

What I Would Do Differently

In retrospect, I would have liked to have done more research on the performance characteristics of different database management systems before choosing PostgreSQL as our initial database. I would have also liked to have done more testing and simulation of the system before deploying it to production. Additionally, I would have liked to have used more monitoring and logging tools to get a better understanding of the system's behavior and performance. Specifically, I would have used tools like Prometheus and Grafana to monitor the system's performance metrics, and tools like ELK Stack to monitor the system's logs and error messages. Overall, the experience taught me the importance of careful planning, testing, and monitoring in building scalable and performant systems.

Top comments (0)