Ensuring High Availability with Cassandra as a Service: How Home Credit Achieves Continuous Operations

Ensuring High Availability with Cassandra as a Service: How Home Credit Achieves Continuous Operations

Introduction

The Struggle for a Scalable Database: When we started our journey, we quickly realized that our existing database infrastructure was struggling to keep up with the massive influx of data. The demand for our services was growing exponentially, and we needed a database that could expand and scale out effortlessly.

Data Spanning Across Data Centers: As a finance service, we could not afford any downtime or data loss. To ensure data availability, we wanted a solution that could span across our primary data center (DC) and disaster recovery (DR) site. Additionally, we needed the flexibility to add more data centers in the future without disrupting our business model.

No alt text provided for this image

Extending to the Azure Cloud: To further enhance our global reach and data availability, we decided to leverage the capabilities of the Azure cloud. Cassandra’s inherent multi-cloud support made it a natural fit for this expansion. We set up a Cassandra cluster in Azure, connecting it to our existing on-premises clusters through secure communication channels.

Comparing Database Options

The next step was to evaluate various database options available in the market. We looked into both relational and NoSQL databases, considering factors such as scalability, high availability, fault tolerance, and ease of deployment.

The Comparison Process: During our comparison, we found that many traditional relational databases struggled to cope with the demands of big data and distributed environments. These databases faced challenges in scaling horizontally and often had limitations when it came to handling large volumes of concurrent reads and writes.

No alt text provided for this image

SQL vs NoSQL (github.com)

Enter Cassandra — The Game-Changer

Cassandra caught our attention for several reasons. It offered a distributed architecture with a masterless design, allowing it to scale horizontally without a single point of failure. The architecture provided high availability, with no downtime even during hardware failures. Additionally, Cassandra’s decentralized approach allowed for easy data replication across multiple data centers, ensuring data safety and continuity across the entire network.

No alt text provided for this image

  • The Flexibility of Schema: Another significant factor was Cassandra’s schema flexibility. Our application can take advantage over Wide-column databases because it have a flexible schema, allowing for easy addition or removal of columns as needed.
  • Performance: Wide-column databases are optimized for read-heavy workloads. The wide-column model also allows for efficient storage and retrieval of large volumes of data, making it well-suited for high-throughput message applications. Choosing Cassandra can be future proof for various use case from many Funcitonal team
  • Scalability: One main point that we will deploy cluster on both DC/DR and add more node to cluster without impact to current business. Wide-column databases are designed to be highly scalable, allowing for easy distribution of data across multiple nodes in a cluster.
  • Availability: We focus on Active/Active solution for PDC/DRC and Wide-column databases are designed to be highly available, with support for active-active and active-passive replication
  • Cassandra also support storing JSON documents. While Cassandra is often classified as a wide-column database, it also has support for flexible data modeling through its support for wide rows and collections. These features we store JSON documents in a similar document-oriented database like MongoDB.

Cassandra’s ability to handle high write and read throughput at low latencies was a game-changer for us. As a finance service, we deal with real-time data processing and Cassandra’s excellent performance made it the top choice for Performance and Speed

Image Diagram — Simplifying the Decision:

No alt text provided for this image

Conclusion

The reasons to select Cassandra over other solution:

  • We favor a general purpose NoSQL DB rather than document database. Cassandra can be also used to store Json document since it support Json, also it can be used as K-V storage solution in many cases.
  • Redis is already used together with K8S deployments as a caching solution for some local implementations. However, Redis is considered as a caching support component/microservice for the application, not a global deployment.
  • Cassandra with the master-less ring architecture with proper sizing can make an always-on DB system across multiple DCs (including cloud DC). That supports the DR and HA (active-active) scenario since the DB is active in many DCs. The data is always streaming seamlessly between DCs thanks to the distributed architecture of the Cassandra.

In the end, our journey to find the ideal database led us to Cassandra. Its ability to scale out, distribute data across data centers seamlessly, and accommodate schema changes without downtime made it the perfect fit for our finance service. With Cassandra as a service, we can now ensure high availability, scalability, and continuous operations, providing our clients with the best experience possible.

(*) This article was written by Hieu Nguyen - Platform Team Leader

Truong Nguyen Hoang

NSE4, Azure 305, CCIE-RS

1 年

Nice post!

回复
Tan Pham

IT Service Supervisor

1 年

Interesting and helpful knowledge, compliment for author

回复

要查看或添加评论,请登录

社区洞察

其他会员也浏览了