---
title: How To Implement AWS ElastiCache in Magento
description: How To Implement AWS ElastiCache in Magento
---

[![e-Zest logo_An accion lab company_Colour](https://blog.e-zest.com/hubfs/images/Logos%20with%20Tagline/Corporate/SVG/e-Zest%20logo_An%20accion%20lab%20company_Colour.svg "e-Zest logo_An accion lab company_Colour")](https://www.e-zest.com/)

- [WORK](https://www.e-zest.com/our-work)
- [SERVICES](https://www.e-zest.com/our-services) 
    - [Product Engineering](https://www.e-zest.com/digital-product-engineering-services)
    - [Enterprise Data Services](https://www.e-zest.com/enterprise-data-services)
    - [Digital Commerce](https://www.e-zest.com/digital-commerce-services)
    - [Digital Operations](https://www.e-zest.com/digital-operations)
    - [Digital Consulting](https://www.e-zest.com/digital-transformation-consulting-services)
    - [Digital Experience Design](https://www.e-zest.com/digital-experience-design)
- [INSIGHTS](https://blog.e-zest.com/)
- [CAREERS](https://www.e-zest.com/careers)
- [ENTERPRISE DATA SERVICES](https://www.e-zest.com/enterprise-data-services)
- [GENERATIVE AI](https://www.e-zest.com/generative-ai)
- [Healthcare](https://healthcare.e-zest.com)
- [Contact Us](https://www.e-zest.com/contact-us)

- ![Elevating Product Engineering with AI and ML](https://blog.e-zest.com/hubfs/Elevating%20Product%20Engineering%20with%20AI%20and%20ML.jpg)
  
  
  
  
  
  [BLOGS](https://blog.e-zest.com)
  
  #### Elevating Product Engineering with AI and ML
  
  
  
  As technology evolves and customer choices broaden, there is an increasing ...
  
  
  
  [Read more](https://blog.e-zest.com/elevating-product-engineering-with-ai-and-ml)
- ![e-Zest – An Accion Labs Company gets Recognition as a Contender in the ISG Provider Lens™ Study on Digital Engineering Services 2024](https://blog.e-zest.com/hubfs/e-Zest%20%E2%80%93%20An%20Accion%20Labs%20Company%20-%20Gets%20Recognition%20as%20a%20Contender%20in%20the%20ISG%20Provider%20LensTM%20Study%20on%20Digital%20Engineering%20Services%202024.jpg)
  
  
  
  
  
  [NEWS](https://blog.e-zest.com/news)
  
  #### e-Zest – An Accion Labs Company gets Recognition as a Contender in the ISG Provider Lens™ Study on Digital Engineering Services 2024
  
  
  
  We are delighted to announce that e-Zest – An Accion Labs Company has been ...
  
  
  
  [Read more](https://blog.e-zest.com/news/e-zest-an-accion-labs-company-gets-recognition-as-a-contender-in-the-isg-provider-lens-study-on-digital-engineering-services-2024)
- ![e-Zest Solutions supports Digital Pune Mission](https://blog.e-zest.com/hubfs/blog-files/Digital%20Literacy%20Bus%20e-Zest.png)
  
  
  
  
  
  [CSR](https://blog.e-zest.com/csr)
  
  #### e-Zest Solutions supports Digital Pune Mission
  
  
  
  **Pune, India:** e-Zest Solutions, a leading digital technology innovation ...
  
  
  
  [Read more](https://blog.e-zest.com/csr/e-zest-solutions-supports-digital-pune-mission)

- [Work](https://www.e-zest.com/our-work)
- [Services](https://www.e-zest.com/our-services)
- [Insights](https://blog.e-zest.com)
- [Careers](https://www.e-zest.com/careers)
- [Enterprise Data](https://www.e-zest.com/enterprise-data-services)
- [Generative AI](https://www.e-zest.com/generative-ai)
- [Innovations](https://www.e-zest.com/innovations)
- [Healthcare](https://healthcare.e-zest.com)
- [About](https://www.e-zest.com/about-us)
- [Contact](https://www.e-zest.com/contact-us)

- [Blog](https://blog.e-zest.com/)
- [News](https://blog.e-zest.com/news)
- [CSR](https://blog.e-zest.com/csr)

- [![Linkedin Icon](https://blog.e-zest.com/hubfs/icons/linkedin_icon_white.svg)](https://www.linkedin.com/company/e-zest-solutions/)
- [![Twitter Icon](https://blog.e-zest.com/hubfs/twitter-logo-silhouette%20(5).svg)](https://twitter.com/ezest)
- [![Facebook Icon](https://blog.e-zest.com/hubfs/facebook-app-logo%20(4).svg)](https://www.facebook.com/61259256638)
- [![Instagram Icon](https://blog.e-zest.com/hubfs/instagram-logo%20(4).svg)](https://www.instagram.com/ezestsolutions/)
- [![Youtube Icon](https://blog.e-zest.com/hubfs/icons/youtube_icon_white.svg)](https://www.youtube.com/user/ezestcorporate)

[![Go to top icon](https://blog.e-zest.com/hubfs/AA%20Assets/top%20button.svg)](https://blog.e-zest.com/how-to-implement-aws-elasticache-in-magento/#top)

Hit enter to search or ESC to close

Insights

e-Zest members share technology ideas to foster digital transformation.

- [Blog](https://blog.e-zest.com)
- [News](https://blog.e-zest.com/news)
- [Podcasts](https://www.e-zest.com/podcasts)
- [Healthcare](https://blog.e-zest.com/healthcare)
- [CSR](https://blog.e-zest.com/csr)
- [Whitepaper](https://blog.e-zest.com/whitepaper)
- [Playbook](https://blog.e-zest.com/playbook)
- [Media Kit](https://www.e-zest.com/media-kit)

# How To Implement AWS ElastiCache in Magento

[Vidya Palaskar](https://blog.e-zest.com/author/vidya-palaskar)  Dec 29, 2014

[AWS ElastiCache](https://blog.e-zest.com/topic/aws-elasticache) [Magento](https://blog.e-zest.com/topic/magento) [AWS ElastiCache in Magento](https://blog.e-zest.com/topic/aws-elasticache-in-magento) [cloud computing](https://blog.e-zest.com/topic/cloud-computing-2) [Technology](https://blog.e-zest.com/topic/technology)

- <https://www.linkedin.com/shareArticle?mini=true&url=https://blog.e-zest.com/how-to-implement-aws-elasticache-in-magento/&title=&summary=&source=>
- <https://twitter.com/intent/tweet?source=https://blog.e-zest.com/how-to-implement-aws-elasticache-in-magento/&text=How%20To%20Implement%20AWS%20ElastiCache%20in%20Magento>
- <https://www.facebook.com/sharer/sharer.php?u=https://blog.e-zest.com/how-to-implement-aws-elasticache-in-magento/>
- <https://www.instagram.com/ezestsolutions/?u=https://blog.e-zest.com/how-to-implement-aws-elasticache-in-magento/>

For any web application, caching plays a vital role in performance. We all know about Magento as a powerful e-commerce framework. Its community version though is slower. However, there are ways to speed it up as well.

One such tool is Amazon's ElastiCache. ElastiCache supports Memcached which is an open-source in-memory caching engine. Memcached is suitable if the data is large and distributed on multiple servers, and that’s the reason ElastiCache supports the engine. For more on Amazon's ElastiCache, refer to its [official page](%20http:/aws.amazon.com/elasticache/).

Magento has numerous included files in a single request which means that a good amount of server load can be curbed through AWS ElastiCache. It reduces server load by storing cache in different nodes. This caching mechanism helps take care of Magento’s heavy hits on the database by caching data away from it. To enable Memcached into Magento, modify main configuration file of Magento i.e. local.xml

Steps to implement ElastiCache with Magento :

1) Get all AWS cache cluster nodes.

2) Open local.xml Magento from the 'app/etc/local.xml'

- Inside global tag below <session\_save><!\[CDATA\[files\]\]></session\_save> add the following piece of code -

```

<cache>
	  <backend>memcached</backend><!-- apc / memcached / empty=file -->
	  <memcached><!-- memcached cache backend related config -->
	    <servers><!-- any number of server nodes can be included -->
		  <server>
	        <host><![CDATA[yourserver1.n3vrvk.0001.use1.cache.amazonaws.com]]></host>
<port><![CDATA[11211]]></port>
<persistent><![CDATA[1]]></persistent>
	        </server>

	<server>
	        <host><![CDATA[yourserver1.n3vrvk.0002.use1.cache.amazonaws.com]]></host>
<port><![CDATA[11211]]></port>
<persistent><![CDATA[1]]></persistent>
	  </server>
               <server>
	        <host><![CDATA[yourserver1.n3vrvk.0003.use1.cache.amazonaws.com]]></host>
<port><![CDATA[11211]]></port>
<persistent><![CDATA[1]]></persistent>
	   </server>
 <server>
	        <host><![CDATA[yourserver1.n3vrvk.0004.use1.cache.amazonaws.com]]></host>
<port><![CDATA[11211]]></port>
<persistent><![CDATA[1]]></persistent>
	   </server>
     	<server>
	        <host><![CDATA[yourserver1.n3vrvk.0005.use1.cache.amazonaws.com]]></host>
<port><![CDATA[11211]]></port>
<persistent><![CDATA[1]]></persistent>
              </server>
         </servers>
  <compression><![CDATA[0]]></compression>
  <cache_dir><![CDATA[]]></cache_dir>
 <hashed_directory_level><![CDATA[]]></hashed_directory_level>
 <hashed_directory_umask><![CDATA[]]></hashed_directory_umask>
<file_name_prefix><![CDATA[myCache_]]></file_name_prefix>
</memcached>
</cache>
```

Your local.xml file will look like the screenshot below.  
 3) Save your file and enjoy your Magento store.  
 For more details information on creating AWS ElastiCache nodes, read this blog.

```

<config>
    <global>
        <install>
            <date><![CDATA[Thu, 01 Nov 2012 09:24:16 +0000]]></date>
        </install>
        <crypt>
            <key><![CDATA[test]]></key>
        </crypt>
        <disable_local_modules>false</disable_local_modules>
        <resources>
            <db>
<table_prefix><![CDATA[]]></table_prefix>
            </db>
            <default_setup>
                <connection>
                    <host><![CDATA[Your_database_hostname]]></host>
                    <username><![CDATA[your_database_username]]></username>
<password><![CDATA[your_database_password]]></password>
                                                                                <dbname><![CDATA[your_databaseName]]></dbname>
                    <initStatements><![CDATA[SET NAMES utf8]]></initStatements>
                    <model><![CDATA[mysql4]]></model>
                    <type><![CDATA[pdo_mysql]]></type> 
<pdoType><![CDATA[]]></pdoType>
                    <active>1</active>
                </connection>
            </default_setup>
        </resources>
        <session_save><![CDATA[files]]></session_save>
                <cache>
                  <backend>memcached</backend><!-- apc / memcached / empty=file -->
                  <memcached><!-- memcached cache backend related config -->
                    <servers><!-- any number of server nodes can be included -->
                                  <server>
                        <host><![CDATA[server1.0001.use1.cache.amazonaws.com]]></host>
<port><![CDATA[11211]]></port>
<persistent><![CDATA[1]]></persistent>
                        </server>

                                                <server>
                        <host><![CDATA[server2.0002.use1.cache.amazonaws.com]]></host>
<port><![CDATA[11211]]></port>
<persistent><![CDATA[1]]></persistent>
                        </server>

                                                <server>
                        <host><![CDATA[server3.0003.use1.cache.amazonaws.com]]></host>
<port><![CDATA[11211]]></port>
<persistent><![CDATA[1]]></persistent>
                        </server>

                                                <server>
                        <host><![CDATA[server4.0004.use1.cache.amazonaws.com]]></host>
<port><![CDATA[11211]]></port>
<persistent><![CDATA[1]]></persistent>
                        </server>

                                                <server>
                        <host><![CDATA[server5.0005.use1.cache.amazonaws.com]]></host>
<port><![CDATA[11211]]></port>
<persistent><![CDATA[1]]></persistent>
                        </server>

                    </servers>
                    <compression><![CDATA[0]]></compression>
                    <cache_dir><![CDATA[]]></cache_dir>
                    <hashed_directory_level><![CDATA[]]></hashed_directory_level>
                    <hashed_directory_umask><![CDATA[]]></hashed_directory_umask>
                    <file_name_prefix><![CDATA[iwsCache_]]></file_name_prefix>
                  </memcached>
  </cache>

    </global>
    <admin>
        <routers>
            <adminhtml>
                <args>
                    <frontName><![CDATA[admin]]></frontName>
                </args>
            </adminhtml>
        </routers>
    </admin>
</config>
```

- <https://twitter.com/intent/tweet?source=https://blog.e-zest.com/how-to-implement-aws-elasticache-in-magento/&text=How%20To%20Implement%20AWS%20ElastiCache%20in%20Magento>
- <https://www.facebook.com/sharer/sharer.php?u=https://blog.e-zest.com/how-to-implement-aws-elasticache-in-magento/>
- <https://www.linkedin.com/shareArticle?mini=true&url=https://blog.e-zest.com/how-to-implement-aws-elasticache-in-magento/&title=&summary=&source=>

### Similar Blog

[Performance tuning for Magento Community Edition Magento is a very popular, robust and enterprise grade open source e-commerce framework built in PHP. On one side these are the ... By Vidya Palaskar Mar 14, 2013](https://blog.e-zest.com/performance-tuning-for-magento-community-edition/)

## Helping Organizations Thrive in the Digital Age

[Contact Us](https://www.e-zest.com/contact-us)

- [About](https://www.e-zest.com/about-us)
- [Services](https://www.e-zest.com/our-services)
- [Work](https://www.e-zest.com/our-work)
- [Insights](https://blog.e-zest.com/)
- [Healthcare](https://healthcare.e-zest.com/)
- [Accion Labs](https://www.accionlabs.com/)

- <https://www.linkedin.com/company/e-zest-solutions/>
- <https://twitter.com/ezest>
- <https://www.facebook.com/eZest/>
- <https://www.instagram.com/ezestsolutions/>
- <https://www.youtube.com/user/ezestcorporate>

- Dallas
- Detroit
- Hannover
- Vienna
- London
- Pune

 © 2025 e-Zest Solutions

- [Privacy Policy](https://www.e-zest.com/privacypolicy)
- [Cookie Policy](https://www.e-zest.com/cookie-policy)

 Contact us

 Contact us

e-Zest is a leading digital innovation partner for enterprises and technology companies that utilizes emerging technologies for creating engaging customers experiences. Being a customer-focused and technology-driven company, it always helps clients in crafting holistic business value for their software development efforts. It offers software development and consulting services for cloud computing, enterprise mobility, big data and analytics, user experience and digital commerce.

![](https://dc.ads.linkedin.com/collect/?pid=322361&fmt=gif)