ApsaraDB for Memcache

A high-performance managed Memcached database service to get your applications up and running

ApsaraDB for Memcache is a managed memory based caching service, which supports high-speed access to queries and data. ApsaraDB for Memcache improves the response of dynamic websites or applications by relieving the load on the backend database as cache data is stored in-memory.

By giving your applications quick access to data and significantly reducing latency, ApsaraDB for Memcache allows you to easily get your applications up and running. This in turn frees you up from managing server lists, nodes, clusters, updates and patches.

Benefits

Cost-effective
Cost effective with no upfront cost or long-term commitment
High Performance
Provides faster data response as cache data is stored in-memory
Easy-to-use
Easy provisioning through the Alibaba Cloud Management Console for memcached hosting
Easy to change configurations without any service interruptions
Scales storage capacity based on real-time application requirement
Compatible
Compatible with open-source Memcached binary (SASL) protocol
Simplifies and automates database management within memcached hosting

Features

  • Performance

    Provides quick access to data with in-memory caching service.
    Replaces unhealthy nodes and prevents data loss due to Single Point of Failure (SPOF).
    Acts as a session manager, for example, it can store the user session data and synchronize among application programs.

  • Security Assurance

    Prevents attacks by restricting access to nodes only through private networks for applications running on Alibaba Cloud ECS servers.
    Provides high-level security for applications with features such as user authentication and IP address whitelisting.

  • Elastic Expansion

    Easily scale your nodes up or down according to business needs without service interruption.

  • Hot Data Access

    Reduces the load on back-end storage by caching frequently accessed data.
    Increases response rate of applications.

  • Compatible with Common Protocols

    Supports all Key-Value data structures.
    Clients which are Memcached-protocol compliant can use ApsaraDB for Memcache.

  • Monitoring and Analysis

    Increased visibility with real-time and historical monitoring based on multiple view statistics.

  • Effective Management

    Enables you to focus on business by providing routine maintenance, software and hardware fault handling services and patch updates. Try out over 40 products for free

  • Reliable & Secure

    Restores services automatically with distributed clustering and load balancing design.


    Protects deployments from Single Point of Failures by replacing unhealthy nodes.


    Automatically restores client sessions to the application.


    Supports fully encrypted SSL connection without compromising performance.


    Ensures restricted access to server to prevent various network attacks.

How it works

  • Database Caching - Large amount of temporary data
  • Database Caching - Large number of visitors
  • Temporary Data Storage -Large amount of temporary data
  • Temporary Data Storage - Large number of visitors
Database Caching - Large amount of temporary data

Database Caching - Large amount of temporary data

Web applications scenarios include:

- Have a large number of concurrent requests.

- Require increased response time for queries, and experience service interruptions due to increased load.

  • In such scenarios, ApsaraDB for Memcache in combination with Relational Database Service (RDS) can be used as a database cache service to provide storage solutions with high throughput and low latency.

  • If your application is deployed on ECS and RDS and is being used as the database, then your system architecture will be as follows:

  • When the application triggers a data read request (a=?, a query), the RDS will directly return data (a=2) , see the figure on the left.

Database Caching - Large number of visitors

Database Caching - Large number of visitors

Web applications scenarios include:

- Have a large number of concurrent requests.

- Require increased response time for queries, and experience service interruptions due to increased load.

  • When ECS, RDS and ApsaraDB for Memcache are used in combination, you have the following architecture where the data reading process will be as follows:

  • 1. When the application triggers a data read request (a=?), it accesses Memcached server for the first time which returns a null value as no data exists in ApsaraDB for Memcache.

  • 2. Then the application triggers another data read request (a=?) to the RDS, which will return a value i.e. (a=2).

  • 3. The value from RDS is then stored in Memcached server (a=2, query response). As a result, the application can directly hit the cache while reading data next time.

  • 4. The load on RDS is relieved by placing frequently accessed data in ApsaraDB for Memcache.

  • 5. This saves RDS cost and improves overall availability of the system.

Temporary Data Storage -Large amount of temporary data

Temporary Data Storage -Large amount of temporary data

ApsaraDB for Memcache can be used to store data temporarily for an application program.

  • • Applicable to web applications which needs to maintain a large amount of temporary data such as, social network, e-commerce, gaming and advertisements.
    • Applicable to web applications in a distributed environment.

  • Solution

    The temporary data can be stored in ApsaraDB for Memcache which:

    • Reduces memory usage.
    • Improves workload of application programs.
    • Avoids data loss due to SPOFs.
    • Ensures synchronization among application servers.

Temporary Data Storage - Large number of visitors

Temporary Data Storage - Large number of visitors

ApsaraDB for Memcache can be used to store data temporarily for an application program.

  • For websites with large number of visitors.

  • Solution

    You can use ApsaraDB for Memcache as a session manager, deploy web applications on several ECS instances and utilize Server Load Balancer for load balancing. ApsaraDB for Memcache

    • Saves session data such as token of user, authority information and other data.
    • Acts as a central repository where various servers can fetch data and sync.

FAQs

1. Why can’t I access ApsaraDB for Memcache instances using my local machine via public networks?

ApsaraDB for Memcache only supports accesses from Alibaba Cloud Intranet. Only applications on Elastic Compute Server (ECS) instances can access and use ApsaraDB for Memcache instances.

2. Does ApsaraDB for Memcache support data rollback?

No, ApsaraDB for Memcache doesn’t support data rollback.

3. Why does SpyMemcached become abnormal without any specific reason?

At present, SpyMemcached does not support concurrent accesses. If concurrent accesses are tried, the protocol package may not function properly.

4. Does ApsaraDB for Memcache support persistent data storage?

ApsaraDB for Memcache instances store data in their memory. Therefore, ApsaraDB for Memcache cannot be used for persistent data storage.

5. How many nodes will be used to store or read/write ApsaraDB for Memcache data?

Multiple nodes in a cluster can be used for data storage and read/write operations in ApsaraDB for Memcache. These nodes work simultaneously.

6. What data types are supported by ApsaraDB for Memcache?

ApsaraDB for Memcache currently supports only Key-Value data structure.

7. How can I clear the ApsaraDB for Memcache cache?

You can simply log into the Management Console to clear the cache of Memcached servers.

8. What are the data sizes supported by ApsaraDB for Memcache?

The maximum key-size and value-size supported by Alibaba Cloud DB for Memcached are 250B and 1000KB respectively. Objects of large sizes that consume a large amount of bandwidth, result in low Queries Per Second (QPS). Therefore, the recommended value size is smaller than 10KB.

9. Can ApsaraDB for Memcache proactively disable an idle user connection?

ApsaraDB for Memcache does not proactively disconnect an idle user connection. However, if the Server Load Balancer is deployed, ApsaraDB for Memcache will disconnect an idle user connection based on the disconnection time set on the Server Load Balancer.

10. Is Memcached the same as ApsaraDB for Memcache? If not, what are the differences?

Memcached uses Tair internally and provides services using Memcached interfaces. The command and returned error values of Memcached and those of ApsaraDB for Memcache are consistent. Therefore, you can have a seamless handoff between Memcached and ApsaraDB for Memcache. Here are the two main differences:

• The operands of Increment and Decrement in ApsaraDB for Memcache are 64-bit unsigned integers but in Memcached it is 32-bit unsigned integers. In addition, the operation results on string data are different.
• The CAS value in ApsaraDB for Memcache is a 32-bit unsigned integer while it is a 16-bit unsigned integer in Memcached.

11. Will the cache data be stored in SSD or in memory?

ApsaraDB for Memcache only provides cache feature and the data is stored in the memory.

12. How many concurrent requests are supported per second to access a single Key-Value pair in ApsaraDB for Memcache?

ApsaraDB for Memcache supports a maximum of 30,000 QPS to a single Key-Value pair. An error will be triggered if you exceed this limit.

Upgraded Support For You

1 on 1 Presale Consultation, 24/7 Technical Support, Faster Response, and More Free Tickets.

1 on 1 Presale Consultation

Consulting by experienced cloud experts.Learn More

24/7 Technical Support

Extended service time from 10 hours 5 days a week to 24/7. Learn More

6 Free Tickets per Quarter

The number of free tickets doubled from 3 to 6 per quarter. Learn More

Faster Response

Shorten after-sale response time from 36 hours to 18 hours. Learn More
phone Contact Us