DEV Community

Cover image for Scaling Databases: A Developer's Journey
Alejandro Duarte
Alejandro Duarte

Posted on • Edited on

Scaling Databases: A Developer's Journey

In the vast world of software development, navigating the world of databases is quite an adventure. There are so many options tailored to general and specific use cases that trying to explore the database ecosystem is a challenge in itself. That’s one of the reasons I find MariaDB so compelling to software developers—it’s an advanced battle-tested database that supports many kinds of workloads. Today, MariaDB has differentiated itself from its predecessor, MySQL. With more features, better (in my opinion) SQL syntax, and more storage engines.

Join me on a developer's journey as we explore how MariaDB supports application evolution from a modest beginning to handling massive workloads, supporting developers along the way.

Sea lions

Note: Decorative AI-generated images of sea lions are included in this article (see the official MariaDB logo here).

Chapter 1: A Small Application's Discovery

Our journey begins with a small-scale application. And for it, we need a database that just works. Reliably. And fast! During our search, we stumble upon MariaDB Community Server, an open-source database that has become the default database in most Linux distributions (there must be a good reason for this). This database management system, built upon the ISO SQL/PSM standard, offers high performance and reliability. With MariaDB Community Server, we confidently embark on our journey, knowing that our modest requirements will be met without the burden of database limitations. And we are not alone. A huge online community gathers around MariaDB on social media and more recently, on Slack.

Sea lion

Chapter 2: Scaling Up for Growing Demands

As our application gains traction, the demands placed on our system grow exponentially. It’s no longer an intranet or internal application that a few of our colleagues use. No. Now our application is mission-critical. It has much more than a handful of users. Some of them are external to our organization which increases the pressure on handling security risks. To address this challenge, we turn to MariaDB Enterprise Server. Built on the foundation of the Community Server, the Enterprise variant provides battle-tested features tailored to production environments. With improved defaults and configurations, and features such as enterprise audit, enterprise backup, and enterprise cluster, MariaDB Enterprise Server equips us to handle larger workloads and ensures secure and optimal performance, instilling confidence in our ability to manage sensitive data and scale up in the future. Additional, we can rest assured that team of experts is available for technical support when needed.

Sea lion

Chapter 3: Navigating Traffic and High Availability

The popularity of our application skyrockets, bringing not only good money to the business but also high availability and scaling challenges to tackle. MariaDB MaxScale emerges as a solution—a reliable database proxy that handles read/write splitting for scaling reads, automatic failover and transaction reply, and many other functionalities. MaxScale makes our database cluster look as if it was a single logical application and frees application developers from implementing things such as managing multiple data sources, load balancing, transparent data masking, and even offers the possibility to translate NoSQL (MongoDB) queries to SQL and store the data in one single ACID-compliant relational database.

Sea lions

Chapter 4: Reports and Analytical Ad-Hoc Queries

Our journey takes a turn into real-time data analytics. We now have tons of data available. Stakeholders know this and demand the implementation of reporting features to allow them to extract valuable insights from the data. Enter MariaDB ColumnStore, a specialized storage engine designed for lightning-fast analytical queries. In our application, we implemented a dynamic report generation module that lets users pick and join data from multiple tables in the database. We don’t really know which columns and tables are going to be used, so we don’t know exactly which columns should have indexes. By organizing data in a columnar fashion, ColumnStore frees us from dealing with database indexes as each column is persisted in the hard drive in a columnar fashion (as opposed to row-based storage). A great solution for ad-hoc queries like the ones generated by our report module or data engineers and data scientists.

Sea lions

Chapter 5: Scaling Horizontally for Unprecedented Workloads

As our application continues to flourish, once again we encounter unprecedented levels of database transactions. Scaling reads was possible with read-write splitting automatically handled by MaxScale. However, write operations start to suffer with the increase in load. Scaling writes and preserving the ACID properties may seem daunting (for example when using manual data sharding), but MariaDB Xpand comes to our rescue. This distributed SQL database allows for horizontal scalability of reads and writes. With automated data slicing, replication, and rebalancing, MariaDB Xpand ensures high availability and empowers us to handle billions of transactions per day without compromising the responsiveness and robustness of our application. We are ready to scale linearly (just by adding more nodes) both reads and writes.

Sea lions

Chapter 6: Embracing the Cloud for Infinite Possibilities

Our journey leads us to the boundless realm of the cloud, where MariaDB SkySQL awaits. SkySQL, a second-generation cloud database service, revolutionizes the way we deploy MariaDB products. It simplifies cloud-native deployments of MariaDB Enterprise Server, ColumnStore, and Xpand, unlocking serverless analytical capabilities, geospatial services, remote monitoring, and cloud backup. As a fully managed service, we no longer have to worry about software updates or manual scaling clusters. With a few clicks, we can have a database service that scales with no limits and is maintained by the experts developing MariaDB. And not only that, we get access to DBAs with tons of experience with MariaDB through the SkyDBA offer. Our applications are now unstoppable.

Sea lions

Conclusion

As software developers, our journey is a quest for scalable and reliable database solutions. MariaDB stands out, offering a diverse suite of tools tailored to every need. From the simplicity of MariaDB Community Server to the scalability of MariaDB Xpand and the cloud-native capabilities of MariaDB SkySQL, MariaDB empowers us to conquer the complexities of database management. I hope I have inspired you to learn more about databases and MariaDB. I’m happy to answer any questions or present this topic internally at your company, conference, developer group, meetup… anything. Just let me know!

Top comments (0)