High-Performance Redis on Alibaba

本文涉及的产品
云数据库 Redis 版,社区版 2GB
推荐场景:
搭建游戏排行榜
简介: Redis is an open source in-memory database used by companies around the world—for everything from caching to queuing.

Galera_to_be_phased_out_MySQL_Group_Replication_officially_launched

Redis is an open source in-memory database used by companies around the world—for everything from caching to queuing. Because of its speed and ease of use, Redis is a personal favorite solution of mine for dealing with large key-value datasets.

In the past, I've used Redis to speed up costly ranking queries that were ill-suited to a more traditional relational database. I also often use it to manage auto-expiring caches and FI/FO queue systems within many of the projects I find myself working on.

In this post, I demonstrate how to run Redis on Alibaba Cloud using the ApsaraDB service for high-performance database applications.

Getting Started with ApsaraDB for Redis

01

Alibaba Cloud Console

As a result of the popularity of Redis, it's no surprise that Alibaba Cloud has a great solution for spinning up affordable, highly available instances with minimal overhead and next to no effort. To get started with Redis on Alibaba Cloud, first head to the Alibaba Cloud console and click on the ApsaraDB for Redis button within Products & Services:

02

ApsaraDB for Redis Instance List

Next, we'll have to actually create a Redis instance to connect to. To do this, click on the Create Instance button within the ApsaraDB for Redis Instance List. It is important to note that, while the instance list is scoped to a specific region (Virginia, Silicon Valley, etc), you will have the opportunity to select a different region while creating a new instance.

ApsaraDB Configuration

03

ApsaraDB for Redis Configuration

That button will take us to the ApsaraDB order form, which will allow us to select the desired Redis configuration prior to deployment. ApsaraDB Redis configuration falls into four main sections: Basic Configuration, Network, Password, and Quantity.

Basic Configuration

The Basic Configuration section is where you select the type of Redis instance you would like to deploy, and the region and zone to deploy it in.

Network

The Network section gives you the opportunity to define which network to run your instance on. At a high level, services running on the Classic Network are not isolated, which means that access can only be blocked by the security group or whitelist policy of the service. On the flip side, the VPC (Virtual Private Cloud) network allows you to build an isolated network environment by providing the ability to customize the route table, IP address range, and gateway within the VPC. Be aware that, while you can convert a classic network instance to a VPC instance, you cannot convert a VPC instance to a classic network instance.

Password

04

Reset ApsaraDB for Redis Password

The Password section allows you to set the password of your Redis instance before, or after checkout. While I personally recommend setting the password before checkout, if you decide to set it later, you will have to click on the Modify Password button within the instance information panel, and then proceed to reset the password.

Quantity

Like Basic Configuration, Quantity is a pretty self-explanatory section. If you need to spin up more than one distinct instance, you can purchase up to 10.

Connecting to Redis

05

ApsaraDB for Redis Instance List

Once you've purchased your Redis instance, it's time to get connected to it. To do this, head back to the ApsaraDB for Redis Instance List and click on the region that you purchased your instance for. You should see a new instance under the region that you chose during checkout. Clicking on the name of the instance will take you to the Instance Information panel, which is where we can find information such as the connection address, port number, zone, and other configuration options.

06

ApsaraDB for Redis Instance Information

Before we can connect to our instance, however, we first need to set up our whitelist. ApsaraDB for Redis only allows connections from within the Alibaba Cloud intranet, which means that only Redis clients on ECS instances within the Alibaba Cloud network can connect to the service. Regardless, by default, connections to ApsaraDB for Redis are limited to localhost access only, so to open this up to our own applications, we need to whitelist some IP addresses. To do this, open the Whitelist Settings panel found near Instance Information, and add any IP addresses or IP ranges to the list.

07

ApsaraDB for Redis Whitelist Settings

After access is opened to the appropriate IP addresses, you can test the connection by logging into any ECS instance within the same network and connecting via the redis-cli command line tool:

08

Testing Redis Connection

Next Steps

While this is just a simple demonstration, it shows just how easy it is to get started with ApsaraDB for Redis in Alibaba Cloud. Because of the security policies that are used to protect your Redis instances from the outside world, hosting your entire application infrastructure on Alibaba Cloud will give you the advantage of ease-of-use, combined with advanced configuration ability.

Bio

09

Zachary Flower (@zachflower) is a Fixate IO Contributor and lead developer at Emerson Stone, a Boulder-based design and branding agency. He has an eye for simplicity and usability, and strives to build products with both the end user and business goals in mind. From building projects for the NSA to creating features for companies like Name.com and Buffer, Zach has always taken a strong stand against needlessly reinventing the wheel, often advocating for the use of well established third-party and open source services and solutions to improve the efficiency and reliability of a development project.

相关实践学习
基于Redis实现在线游戏积分排行榜
本场景将介绍如何基于Redis数据库实现在线游戏中的游戏玩家积分排行榜功能。
云数据库 Redis 版使用教程
云数据库Redis版是兼容Redis协议标准的、提供持久化的内存数据库服务,基于高可靠双机热备架构及可无缝扩展的集群架构,满足高读写性能场景及容量需弹性变配的业务需求。 产品详情:https://www.aliyun.com/product/kvstore     ------------------------------------------------------------------------- 阿里云数据库体验:数据库上云实战 开发者云会免费提供一台带自建MySQL的源数据库 ECS 实例和一台目标数据库 RDS实例。跟着指引,您可以一步步实现将ECS自建数据库迁移到目标数据库RDS。 点击下方链接,领取免费ECS&RDS资源,30分钟完成数据库上云实战!https://developer.aliyun.com/adc/scenario/51eefbd1894e42f6bb9acacadd3f9121?spm=a2c6h.13788135.J_3257954370.9.4ba85f24utseFl
目录
相关文章
|
10月前
Query Performance Optimization at Alibaba Cloud Log Analytics Service
PrestoCon Day 2023,链接:https://prestoconday2023.sched.com/event/1Mjdc?iframe=no首页自我介绍,分享题目概要各个性能优化项能够优化的资源类别limit快速短路有什么优点?有啥特征?进一步的优化空间?避免不必要块的生成逻辑单元分布式执行,global 阶段的算子哪些字段无需输出?公共子表达式结合FilterNode和Proje
Query Performance Optimization at Alibaba Cloud Log Analytics Service
|
资源调度 监控 网络协议
Cluster & Security & Python Topic | Cloud computing (FREE)
云计算 Cluster & Security & Python 习题(试读)
89 0
|
存储 负载均衡 算法
Cluster Topic | Cloud computing (FREE)
云计算 Cluster 题目(试读)
161 0
|
SQL XML 数据格式
Q&A – High CPU Usage on Alibaba Cloud SQL Server
A primary issue with SQL Server is its sensitivity to latency, often resulting in performance issues.
1733 0
Q&A – High CPU Usage on Alibaba Cloud SQL Server
|
NoSQL Redis Memcache
Redis vs. Memcached: In-Memory Data Storage Systems
Redis and Memcached are both in-memory data storage systems. Memcached is a high-performance distributed memory cache service, and Redis is an open-source key-value store.
1926 0
Redis vs. Memcached: In-Memory Data Storage Systems
|
SQL 关系型数据库 RDS
Troubleshooting High CPU Usage on Alibaba Cloud SQL Server
A primary issue with SQL Server is its sensitivity to latency, often resulting in performance issues.
1317 0
Troubleshooting High CPU Usage on Alibaba Cloud SQL Server
|
弹性计算 NoSQL 安全
AMP for E-Commerce Part 2: Creating Backend with Alibaba Cloud ApsaraDB for MongoDB
In this three-part tutorial, we will explore how to create a fully functional e-commerce mobile application using AMP.
1549 0
AMP for E-Commerce Part 2: Creating Backend with Alibaba Cloud ApsaraDB for MongoDB
|
JSON 弹性计算 NoSQL
AMP for E-Commerce Part 3: Integrating the Entire Application with Alibaba Cloud ApsaraDB for MongoDB
In this three-part tutorial, we will explore how to create a fully functional e-commerce mobile application using AMP.
1774 0
AMP for E-Commerce Part 3: Integrating the Entire Application with Alibaba Cloud ApsaraDB for MongoDB
|
固态存储 关系型数据库 分布式数据库
100TB Capacity and 6x Performance Improvement with Alibaba Cloud PolarDB
This article focuses on the optimizations of Alibaba Cloud PolarDB's compute and storage engines to offer an unparalleled performance.
5890 0
100TB Capacity and 6x Performance Improvement with Alibaba Cloud PolarDB
|
弹性计算 Ubuntu Linux
3 Ways to Set Up a Linux Server on Alibaba Cloud
Find out how you can quickly and easily set up a Linux server on Alibaba Cloud ECS. This tutorial is designed for first-time users of Alibaba Cloud.
3000 0
3 Ways to Set Up a Linux Server on Alibaba Cloud