Up to 10 million operations per second in Unity Ads are powered by the memorystore.
Ads for Unity
The mobile advertising startup Unity Ads was searching for a solution that would reduce maintenance costs and scale better for a variety of use cases before utilizing its own self-managed Redis infrastructure. Unity migrated their workloads to Memorystore for Redis Cluster, a fully managed service designed for high-performance workloads. At the moment, their infrastructure can handle up to 10 million Redis operations per second on a single instance.The company's infrastructure is now more reliable and scalable, costs are reduced, and it has more time to focus on high-value projects.
For many customers, handling one million activities per second is an amazing feat, but at Unity Ads, it's just standard practice. The dependable capabilities of Redis clusters are demonstrated by Unity's mobile performance advertisements solution, which easily handles this daily amount of actions and feeds ads to a vast network of mobile apps and games. The multiple database operations needed for real-time ad requests, bidding, and ad selection, as well as for updating session data and tracking performance metrics, lead to extremely high performance requirements.
Google Cloud is aware that this exceptional demand calls for an infrastructure that is both extremely scalable and resilient. This is Memorystore for Redis Cluster, designed to handle the demanding requirements of industries like gaming, finance, and advertising where performance and scale are crucial. By consolidating more demanding workloads into a single, high-performance cluster, this fully managed system maintains microsecond latencies while offering notably more throughput and storage capacity.
Successfully supplying a memory store for the Redis cluster
Before using Memorystore, Unity's previous Do-It-Yourself (DIY) setup had a number of problems. To begin, they used a variety of self-managed Redis clusters, ranging from static clusters built on Terraform modules to Kubernetes operators. These require specialized knowledge and required a great deal of effort to expand and maintain. In order to reduce potential downtime, they often over-provisioned these DIY clusters. However, this cost and the effort needed to maintain this infrastructure are unsustainable in the high-performance advertising sector, where every microsecond and penny counts.
Memorystore offered a compelling solution for Unity Ads. Since it was a perfect fit for their existing setup, switching was simple. It was as costly as their do-it-yourself alternative without the managerial overhead. They also believed that deeper integration with Google Cloud would be advantageous because they were already customers of the platform.
The most important feature is scalability. One of the best features of Memorystore for Redis Cluster is its ability to scale without experiencing any downtime. Customers can simply adapt to changing demands by expanding their clusters to handle terabytes of keyspace with a single click or command. Memorystore also offers smart features that make it more reliable and easy to use. The service automatically distributes nodes throughout zones for high availability and controls replica nodes, placing them in zones different than their principal ones to protect against outages. This automated solution simplifies what would otherwise be a challenging manual task.
Because of all of this, Unity Ads decided to move their use cases, which included session data, distributed locks, state management, and a central valuation cache. The process of moving went more smoothly than anticipated. They successfully finished their most significant session data migration, which processed up to 1 million Redis operations per second, by employing double-writing throughout the shift. Even more impressive was their valuation cache migration, which handled up to half a million requests every second (more than 1 million Redis operations per second) with minimal service interruption. It was finished in about fifteen minutes. The Google team also successfully moved Unity's distributed locks mechanism to Memorystore to avoid processing the same event twice.
Memorystore in use: the Unity Ads version
Google Cloud's Memorystore for Redis Cluster is a transformative experience. One of the most evident benefits it noticed was the increased stability of its infrastructure. Its previous DIY Redis cluster often encountered unpredictable performance problems that were difficult to pinpoint because it was running on different layers of virtualization services, such Kubernetes and cloud computing, where it lacked direct observability and management.
Take, for instance, this CPU usage graph of particular nodes from its prior self-managed configuration:
As you can see, there was a lot of fluctuation and regular spikes in the CPU utilization across numerous nodes. It was difficult to maintain consistent performance under these conditions, especially when traffic was heavy.
It also experienced problems with its DIY Redis clusters during Kubernetes nodepool upgrades, which are often the consequence of automatic upgrades to a new version of Kubernetes. You can see the p99 latency is exploding!
Another significant advantage is that Memorystore has made it possible for us to expand output without interruption. Its client metrics are shown in this graph as the cluster's size expanded by 60%.
Throughout the process, the operation rate remained remarkably consistent with minimal fluctuations. Because it allowed us to adapt to changing needs without sacrificing our offers, this level of seamless scaling revolutionized everything for us.
The data shown above describes the amazing performance and consistent low latency it has achieved utilizing Memorystore. This performance level is crucial for its ad-serving platform, where every microsecond counts.
Profiting from invention
In addition to performance improvements, the move to Memorystore for Unity advertisements has produced noticeable operational improvements. It no longer makes the effort to test and optimize its Redis clusters in order to get them ready for production.
In terms of business, it expects to achieve cost reductions comparable to its previous do-it-yourself solution by appropriately scaling clusters and utilizing the applicable Committed Use Discounts, especially with the advent of single zone clusters to reduce networking costs. With Memorystore, it can now have a fully managed, scalable, and far more reliable (99.99% SLA) solution for a same cost as the previous self-managed Redis deployment.
Memorystore has opened up new possibilities for system architecture with an eye toward the future. It is currently considering adopting a "Memorystore-first" approach for a large number of use cases. When developing critical data systems, for example, developers usually choose for persistent database solutions like Bigtable because they don't want to take any chances, regardless of whether the use case truly calls for persistence and/or consistency.
Sometimes the use case only needs data durability for an hour or so, but databases like Bigtable are better suited for data that will last for months to years. By avoiding such shortcuts and optimizing for its shorter durable (like hours-to-day) data use cases with a reliable, hardened Redis Cluster solution like Memorystore, it may save development time and money. Overall, due of Memorystore's scalability and reliability, it may reliably expand the use of Redis across more infrastructure to lower costs and improve performance.
Another ground-breaking benefit is how simple it is to enable persistence (AOF or RDB) on Memorystore. Because its Kubernetes DIY Redis cluster would not support permanence, its use cases were limited to caching scenarios with temporary data that it could afford to lose. Memorystore's one-click persistence allows it to expand use cases and even mix use cases within the same cluster, increasing use and lowering costs.
In business, every second counts. By letting the team focus on core business innovation rather than infrastructure management, Memorystore is helping them stay competitive and deliver better results to its publishers and advertisers.

0 Comments