Home / Companies / Dragonfly / Blog / May 2023

May 2023 Summaries

3 posts from Dragonfly

Filter
Month: Year:
Post Summaries Back to Blog
Dragonfly is an in-memory database that can act as a drop-in replacement for Redis, offering high availability and production readiness. Version 1.0 of Dragonfly includes database replication, making it easy to migrate from Redis and suitable for high-availability deployments. High availability refers to a system's ability to operate continuously without downtime or failure, preferably by using built-in failover mechanisms rather than over-provisioning. Dragonfly's replication process is fast and memory-reliable, supporting high throughput, making it perfect for high-availability solutions, especially where existing Redis deployments are struggling. The API provided by Dragonfly is fully compatible with Redis, allowing users to use it with their existing applications and libraries without the need to make any code changes. Database replication is the process of continuously copying the contents of a primary database to replica databases, which are usually running on different servers. This allows systems to avoid a single point of failure — if your primary node fails, a replica can be automatically promoted to be the new master node, becoming the new destination for data writes and the source of any other remaining replicas. Dragonfly uses a shared-nothing architecture that allows data to be replicated in parallel over different connections, with one connection per thread. This shared-nothing architecture is made possible by the fact that Dragonfly was designed to allow multiple threads, making it super fast. Stored data is spread across different shards within Dragonfly, each holding a different set of keys. Dragonfly’s efficient snapshotting algorithm allows it to send update commands to the replica at the same time as sending the full snapshot. Redis, however, sends the full snapshot first — and stores update commands in an in-memory buffer, which can later be sent to the replica (once snapshotting is complete). Dragonfly’s throughput was 7.6 times faster than that of Redis, while its average latency was 7.6 times lower, and its tail (P99) latency was 3.3 times lower. Also, the “full sync” phase of replication was 5.5 times faster in Dragonfly than Redis, and there were no noticeable memory spikes for Dragonfly, unlike Redis. Dragonfly is fully compatible with Redis Sentinel, which can detect when a master instance has failed and automatically promote a replica to be the next master node.
May 23, 2023 1,401 words in the original blog post.
The text discusses the process of migrating data from a Redis Cluster to a single-node Dragonfly instance. It highlights that Dragonfly is a more efficient solution than Redis Cluster due to its ability to scale vertically and address most shortcomings of Redis Cluster, thereby reducing operational complexity and improving reliability. The migration process involves using the RIOT tool for data replication from Redis Cluster to Dragonfly. The tutorial guides users through setting up a sample application, preparing for the migration, executing the migration, verifying data in Dragonfly, and finally switching the application to use Dragonfly instead of Redis Cluster.
May 09, 2023 1,591 words in the original blog post.
The text discusses the importance of implementing rate limiters to manage high throughput workloads and prevent overloading or spamming in software systems. It provides an overview of common rate limiting algorithms, including Fixed Window Algorithm, Sliding Window Algorithm, Token Bucket Algorithm, Leaky Bucket Algorithm, and Generic Cell Rate Algorithm (GCRA). The author explains how they chose to implement a variation of the leaky bucket algorithm called GCRA in their system Dragonfly. They also provide an example of using CL.THROTTLE command with Dragonfly for rate limiting. The text concludes by emphasizing the importance of rate limiters and hints at future work on implementing HTTP rate-limiting headers for RESTful API servers.
May 02, 2023 1,872 words in the original blog post.