Redis
-
How to Build a Scalable URL Shortener with Distributed Caching Using Redis
In this tutorial, we’ll build a scalable URL shortening service using Node.js and Redis. This service will leverage distributed caching to handle high traffic efficiently, reduce latency, and scale seamlessly. We’ll explore key concepts such as consistent hashing, cache invalidation strategies, and sharding to ensure the system remains fast and reliable. By the end of this guide, you’ll have a fully functional URL shortener service that uses distributed caching to optimize performance. We’ll also create an interactive demo where users…
-
How To Implement Caching in Node.js Using Redis
The author selected /dev/color to receive a donation as part of the Write for DOnations program. Introduction Most applications depend on data, whether it comes from a database or an API. Fetching data from an API sends a network request to the API server and returns the data as the response. These round trips take time and can increase your application response time to users. Furthermore, most APIs limit the number of requests they can serve an application within a…
-
How To Analyze Managed Redis Database Statistics Using the Elastic Stack on Ubuntu 18.04
The author selected the Free and Open Source Fund to receive a donation as part of the Write for DOnations program. Introduction Database monitoring is the continuous process of systematically tracking various metrics that show how the database is performing. By observing performance data, you can gain valuable insights and identify possible bottlenecks, as well as find additional ways of improving database performance. Such systems often implement alerting that notifies administrators when things go wrong. Gathered statistics can be used…
-
How to Set Up a Website Hit Counter With Redis and PHP on Ubuntu 20.04
The author selected the Apache Software Foundation to receive a donation as part of the Write for DOnations program. Introduction A hit counter is an application that records and indicates the number of visits your web page has received. The counter starts from 1 and is incremented once every time a web page is visited. To keep track of the visits, the hit counter application requires a form of a database. While disk-based database management systems like MySQL can work,…
-
How To Install and Secure Redis on Ubuntu 22.04
Introduction Redis is an in-memory key-value store known for its flexibility, performance, and wide language support. This tutorial demonstrates how to install, configure, and secure Redis on an Ubuntu 22.04 server. Prerequisites To complete this guide, you will need access to an Ubuntu 22.04 server that has a non-root user with sudo privileges and a firewall configured with ufw. You can set this up by following our Initial Server Setup guide for Ubuntu 22.04. Step 1 — Installing and Configuring…
-
How to Speed Up Python/MySQL Application Session Handling With Redis On Ubuntu 22.04
Introduction Authentication is the process of verifying users’ identity during login requests. In an authentication process, users submit their credentials as usernames and passwords. Then, the application matches those login credentials with stored database entries. The application grants users access to the system if there is a match. Storing login credentials in a relational database like MySQL or PostgreSQL without a caching mechanism is still a common and practical approach, but it comes with the following limitations: Overloading the database.…
-
How to Perform a Secure Redis Install on Linux
Redis is beneficial for many things, one of which is caching. You can also use Redis as a primary data store or even as a replacement for a database. But how do you execute a secure Redis install? Installing Redis can be a pain, and if you’re not careful, you could end up with many errors. Lucky for you, this tutorial has got you covered. In this tutorial, you’ll learn how to securely install Redis on your Linux system, along…
-
Databases Checkpoint
Introduction This checkpoint is intended to help you assess what you learned from our introductory articles to Databases, where we defined databases and introduced common database management systems. You can use this checkpoint to test your knowledge on these topics, review key terms and commands, and find resources for continued learning. A database is any logically modeled collection of information or data. When people refer to a “database” in the context of websites, applications, and the cloud, they often mean…
-
How To Manage Redis Databases and Keys
Introduction Redis is an open-source, in-memory key-value data store. A key-value data store is a type of NoSQL database in which keys serve as unique identifiers for their associated values. Any given Redis instance includes a number of databases, each of which can hold many different keys of a variety of data types. In this tutorial, you will learn how to select a database, move keys between databases, and manage and delete keys. How To Use This Guide This guide…