DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Data Engineering
  3. Databases
  4. Redis + MySQL = Fast, Economic Scaling

Redis + MySQL = Fast, Economic Scaling

let's check out some of the things that make it it difficult to accommodate modern application needs using a traditional MySQL architecture.

Roshan Kumar user avatar by
Roshan Kumar
·
Oct. 04, 18 · Analysis
Like (2)
Save
Tweet
Share
20.27K Views

Join the DZone community and get the full member experience.

Join For Free

One of the things that is so great about Redis is how well it can complement and extend other databases in your ecosystem. While replacing legacy backend databases with newer ones is often seen as expensive and risky, they don't easily scale in the linear fashion required for users' 'instant experience' expectations.

Some of the things that make it difficult to accommodate modern application needs using a traditional MySQL architecture are:

  1. Read/write speeds of traditional databases are not good enough for use cases such as session stores.
  2. Introducing new tables or modifying an existing schema can be extremely complex, which makes adding new features and applications extremely difficult.
  3. Legacy databases are limited by the number of operations you can perform per second and by the number of concurrent connections you can have. As a result, you end up having to invest in more database instances - increasing your infrastructure and maintenance costs.

On the other hand, in-memory databases like Redis can help you future-proof and increase the value of your investment. For instance, if your application stores data in MySQL or any other relational database, you can easily insert Redis as a front-end database in between the application and MySQL. By designing look-aside and write-through caching solutions, session stores and rate-limiters with Redis, you'll boost performance, speed innovation, scale with fewer resources and ultimately deliver the best experience for your users.

Redis as a 'System of Engagement'

Redis' in-memory key-value data store can deliver low latency responses for your users because it's extremely fast and flexible and includes built-in data structures (e.g. Lists, Hashes, Sets, Sorted Sets, Bitmaps, Hyperloglog, and Geospatial Indices) that perform some data operations more efficiently and effectively than relational databases. We recommend using Redis behind the data access layer as a 'system of engagement' to store the hot data users engage with, while designating your MySQL as the 'system of record.'

To avoid creating a bottleneck in their application, database or network layers, many developers use Redis for the following use cases:

  • Cache: This provides a tiered model for memory access, in which applications store common, repeatedly read objects in Redis. Caching helps applications retrieve data quickly and limit the load on the database server.
  • Session Store: In all interactive apps, the server maintains a unique session for each active user. Rather than relying on MySQL-like relational databases to persist session data, a single cluster of Redis on decently sized servers with sufficient RAM can manage thousands, if not millions of sessions.
  • Real-time Analytics: Gamification through leaderboards, dashboards, polls, messages, counters and other real-time aggregators require constant processing and communication with end-users. Redis' powerful and highly efficient data structures enable you to collect, process and dissipate millions of simultaneous activities or objects to thousands of active users in real time.
  • Metering: Redis can also help developers cost-effectively manage the load on legacy servers during peak usage times by rate limiting the number of calls applications make every few seconds.

In addition to the examples above, Redis can be used as a message broker, data structure store, and temporary data store for a variety of use cases. Essentially, Redis gets your data closer and faster to your end user while collecting their data more quickly. Taking things to the next level, Redis Enterprise offers high availability, in-memory replication, auto-scaling, and re-sharding along with leading-edge CRDT-based active-active support for distributed databases and built-in Redis modules such as RediSearch, ReJSON, Rebloom, and Redis Graph.

Thanks to this powerful database, today's 'instant experience' demands can be met without ripping out your legacy solutions. Using a bit of creativity, you can instead leverage Redis to balance the need for business continuity and time-to-market with the benefits of superior performance, flexibility, extensibility and scalability.

To learn more, check out my webinar and white paper on why your MySQL needs Redis, or even better, visit us at booth #4107 during Oracle Open World later this month!

Redis (company) Database Relational database MySQL Data (computing) application Scaling (geometry)

Published at DZone with permission of Roshan Kumar, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Load Balancing Pattern
  • Beginners’ Guide to Run a Linux Server Securely
  • Why Open Source Is Much More Than Just a Free Tier
  • How To Generate Code Coverage Report Using JaCoCo-Maven Plugin

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: