Building a new execution platform for Redis customers

0

Over the past decade, Redis has become a popular, widely used in-memory cache.

Unlike most distributed caches, it offers a compelling set of built-in data structures that extend its capabilities beyond just storing serialized objects. Created in 2009 as a single-server store to support the design of a web server, Redis gives applications many useful options for organizing and retrieving stored data, including sets, lists, hashes, and ordered sets.

A few years later, cluster support was added to scale throughput and add data replication for high availability. However, Redis’ cluster implementation introduced special concepts such as hash slots and replica shards that system administrators needed to understand and manage.

These concepts, combined with Redis’ use of eventual consistency rather than full consistency, have introduced a complexity that makes cluster management more difficult while reducing flexibility and reliability.

In contrast, ScaleOut StateServer®, an enterprise-grade distributed serialized object cache first released in 2005, was built from the ground up to run on a server cluster with the specific design goals of high performance and reliable data storage while maximizing usability.

It automates load balancing, data replication and recovery, and stores data with full consistency (i.e. sequential consistency) across replicas. It also executes client requests using all available processing cores for maximum throughput.

These features greatly simplify cluster management, improve flexibility, and lower the total cost of ownership, especially for enterprise users. For example, unlike Redis, ScaleOut server clusters can grow seamlessly from a single server to multiple servers, and sysadmins don’t have to manage hash slots or replica shards.

The challenge – integrating Redis command processing into a new clustering architecture

ScaleOut software realized that running Redis commands on a ScaleOut StateServer cluster would offer users the best of both worlds: familiar and rich data structures combined with significantly easier cluster management and complete data consistency.

However, the ideal implementation would need to use actual open-source Redis code to run commands in order for client commands to behave the same as open-source Redis clusters. The challenge then became how to integrate Redis code into ScaleOut StateServer’s execution platform and take advantage of its highly automated clustering capabilities while removing the single-threaded limitations of Redis’ event-loop architecture.

The company recently completed this integration and released a community preview in ScaleOut StateServer version 5.11, which introduces support for the most popular Redis data structures (strings, sets, lists, hashes, and ordered sets), as well as publish/subscribe commands, transactions, and more various utility commands (like FLUSHDB and EXPIRE) on both Windows and Linux. It uses open source Redis version 6.2.5 code on the servers to process Redis commands.

Automated cluster operations, scalable throughput and complete data consistency

With this integration, Redis clients can connect to a ScaleOut StateServer cluster of one or more servers using the standard Redis RESP protocol.

Redis client libraries obtain mapping of hash slots to servers by internally calling either the CLUSTER SLOTS or CLUSTER NODES commands, and then forwarding Redis access requests to the appropriate ScaleOut server.

When cluster membership changes, clients automatically use the RESP protocol to redirect commands to the correct servers.

To maximize throughput, each ScaleOut server processes incoming Redis commands on multiple threads using all available processor cores. There is no need to deploy multiple shards on each server to scale performance or provide data replication; these functions are implemented within a process on each server.

As the need for additional throughput grows, system administrators can easily add new servers to the cluster. ScaleOut StateServer automatically rebalances hash slots in the cluster as servers are added or removed. It also delays execution of Redis commands during load balancing (and recovery) to get a consistent picture of hash slot placement and avoid client exceptions. After a hash slot has been fully migrated to a remote server, client requests return a -MOVED indication so they can be redirected to the new server.

In addition, ScaleOut StateServer automatically creates replicas for all hash slots. There is no need to manually create primary and replica shards or move them from server to server during membership changes and recovery.

ScaleOut StateServer automatically places replica hash slots on different servers than their corresponding primary hash slots and migrates them as needed during membership changes to ensure optimal load balancing. If a server goes down or has a network outage, ScaleOut StateServer “heals” itself by promoting replicas to primary servers and creating new replicas as needed.

Redis uses an eventual consistency model to update replicas. While this model is fast, it is prone to serving stale data to clients if a server goes down or a network outage occurs. To avoid this problem, ScaleOut StateServer implements fully consistent updates to stored objects using a patented quorum algorithm. When a server receives a Redis command, it completes execution of the command on a quorum that includes the primary hash slot and its replicas before returning to the client. Transactions are processed in the same way.

Conclusion – new opportunities for Redis users

The innovative integration of ScaleOut Software’s open-source code into its cluster architecture will bring powerful new capabilities to Redis users while ensuring native Redis behavior for client applications.

Enterprise users now have an easier way to manage Redis clusters with automated cluster management and built-in throughput scaling, and benefit from fully consistent updates to stored data executed by Redis commands.

You can also access ScaleOut StateServer’s native APIs, which include advanced features not available on open-source Redis clusters, including data-parallel data processing, streaming analytics, and coherent, wide-area data replication.

Want to learn more about cybersecurity and the cloud from industry leaders? Check out the Cyber ​​Security & Cloud Expo taking place in Amsterdam, California and London.

Find out about other upcoming enterprise technology events and webinars hosted by TechForge here.

tags: Redis, scaleout software

Share.

Comments are closed.