Memcached System
Memcached Caching System
How Memcached Works
Memcached can be considered short-term memory for an application. Application code stores and retrieves frequently used objects from RAM before falling back to a slower persistent data source when the requested item is not available in cache.
The cache behaves like a large distributed hash table. When the allocated cache becomes full, older items are removed according to a least-recently-used policy so newer data can be stored.
Client-Server Architecture
Memcached uses a client-server model. Memcached servers maintain key-value data in memory, while application clients write values to the cache and request them later using the corresponding keys.
Why Use Memcached?
Without a distributed caching layer, every web or application node may maintain its own independent cache. This can waste available memory and make cache consistency harder to manage across a scaled application.
As an application grows and more application servers are added, the amount of frequently accessed data generally grows as well. Memcached allows application capacity and distributed cache capacity to scale together.
Add Memcached to an Environment
1Open the platform dashboard
Sign in to your platform account.
2Create an environment
Click Create Environment to open the Environment Topology dialog.
3Select the application server
Choose the application server required by your workload, such as Tomcat in the source example.
4Enable Memcached
Switch on the Memcached node and configure its vertical scaling limits according to the expected caching requirements.
5Name and create the environment
Enter an environment name and click Create.
After the environment has been created, the Memcached node appears together with the selected application server and is ready for application-side cache configuration.
