Skip to main navigation Skip to search Skip to main content

Distributed Relational Databases in Modern Cloud Environments

  • Thomas Brych

    Student thesis: Master's Thesis

    Abstract

    Relational databases are an integral part of modern software systems. However, when hosting complex software systems in the cloud, a single database server can create a bottleneck. When scaling relational database services in cloud environments, a fundamental choice has to be made. One option is to scale vertically by adding more resources to the server. Alternatively, it can be scaled horizontally by adding more instances. By scaling horizontally, the throughput of the system can be increased. Additionally, due to the increased number of independent instances, higher availability is possible. However, scaling horizontally introduces challenges because it increases the complexity of the database system. Replication is the process of working with the same data on multiple instances. When using replication algorithms to scale horizontally, eventual consistency due to replication lag should be considered and addressed. Replication lag is the duration between committing a transaction and making the result available on every instance in the system. PostgreSQL is a popular open-source relational DBMS that supports database replication. This thesis handles three main topics. The first part analyzes the database services offered by Amazon Web Services (AWS), Microsoft Azure and the Google Cloud Platform (GCP) for deploying PostgreSQL databases in the cloud. The cloud provider support database replication and high availability deployments based on standby instances. They also offer custom PostgreSQL implementations or PostgreSQL API-compatible custom implementations to take advantage of distributed cloud system capabilities. Furthermore, the database implementations aim to offer an improved performance as well as an improved behavior when distributing the database across multiple instances. Some systems improve the replication behavior by decoupling the storage and execution engines. Others offer distributed computing by dividing the data into smaller parts and by storing these parts on different instances. This process is also called sharding. Moreover, in the second part the replication behavior of PostgreSQL is compared to AWS’s custom implementation, RDS Aurora, by executing custom load test scenarios. Executing these scenarios allows analyzing the behavior of the system under high load. To analyze the behavior, replication lag has to be measured continuously while executing the scenarios. The final part describes the handling of client applications as, depending on the use case, replication lag and the resulting outdated responses might cause problems. There are multiple algorithms and ideas to mitigate the problems of outdated responses. Therefore, this thesis includes a custom library that addresses replication lag. The library continuously measures replication lag and returns a connection to a database instance that meets certain constraints, including a maximum replication lag.
    Date of Award2025
    Original languageEnglish
    SupervisorJohann Heinzelreiter (Supervisor)

    Studyprogram

    • Software Engineering

    Cite this

    '