AgileApps Support Wiki Pre Release

Difference between revisions of "Configuring memcached"

From AgileApps Support Wiki
imported>Aeric
m (Text replace - 'Category:System Administration' to 'Category:Installation')
 
imported>Aeric
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
==== Configuring memcached ====
<includeonly>==== Configuring memcached ====</includeonly>
 
The MEMory CACHE Daemon is a high-performance, distributed-object caching system that minimizes user response time by caching application data and other elements required by programs running on the application server.  
The MEMory CACHE Daemon is a high-performance, distributed-object caching system that minimizes user response time by caching application data and other elements required by programs running on the application server.  


LongJump uses memcached to store meta information which so that they can be obtained from the cache without accessing the database e.g. Object and field definitions, layout definitions, data policies etc. (Transactional customer data is not stored in memcached--that data is cached by the database.)
The platform uses memcached to store meta information which so that they can be obtained from the cache without accessing the database e.g. Object and field definitions, layout definitions, data policies etc. (Transactional customer data is not stored in memcached--that data is cached by the database.)


Data is stored in memcached using a lazy read mechanism. When some meta information is required, LongJump checks to see if it is available in memcache. If it is available, the data is retrieved. If it is not available, a database read is performed, which in turn populates the entry in memcached. When the meta information changes due configuration changes by the user, the corresponding entry is flushed from memcached.
Data is stored in memcached using a lazy read mechanism. When some meta information is required, the platform checks to see if it is available in memcache. If it is available, the data is retrieved. If it is not available, a database read is performed, which in turn populates the entry in memcached. When the meta information changes due configuration changes by the user, the corresponding entry is flushed from memcached.


{{Important|The configuration for every LongJump instance must have the same memcached settings--otherwise, the caches won't be synchronized. Changing the memcached configuration therefore requires a restart of all Application Servers.}}
{{Important|The configuration for every instance must have the same memcached settings--otherwise, the caches won't be synchronized. Changing the memcached configuration therefore requires a restart of all Application Servers.}}


===== Managing memcached Servers =====
===== Managing memcached Servers =====
Line 29: Line 28:
|}
|}


===== Configuring LongJump Application Servers to Use memcached =====
===== Configuring Application Servers to Use memcached =====


;To enable memcached:
;To enable memcached:
Line 45: Line 44:


{{Important|If there are multiple memcached servers, then:
{{Important|If there are multiple memcached servers, then:
:* Every LongJump instance should have an identical list of servers.
:* Every instance should have an identical list of servers.
:* The servers should be in the same order in each list.
:* The servers should be in the same order in each list.
:* If the configuration changes, all application servers should be restarted.}}
:* If the configuration changes, all application servers should be restarted.}}
:''Learn more: '' [[Adding Additional memcached Servers]]


;To bring up the servers:
;To bring up the servers:
:After making the changes to the [[networking.properties]] files for all Application Servers, (re)start servers in the required [[Server Restart Sequence]].
:After making the changes to the [[networking.properties]] files for all Application Servers, (re)start servers in the required [[Server Restart Sequence]].
 
<noinclude>


[[Category:Installation]]
[[Category:Installation]]
</noinclude>

Latest revision as of 22:42, 21 September 2015

The MEMory CACHE Daemon is a high-performance, distributed-object caching system that minimizes user response time by caching application data and other elements required by programs running on the application server.

The platform uses memcached to store meta information which so that they can be obtained from the cache without accessing the database e.g. Object and field definitions, layout definitions, data policies etc. (Transactional customer data is not stored in memcached--that data is cached by the database.)

Data is stored in memcached using a lazy read mechanism. When some meta information is required, the platform checks to see if it is available in memcache. If it is available, the data is retrieved. If it is not available, a database read is performed, which in turn populates the entry in memcached. When the meta information changes due configuration changes by the user, the corresponding entry is flushed from memcached.

Warn.png

Important: The configuration for every instance must have the same memcached settings--otherwise, the caches won't be synchronized. Changing the memcached configuration therefore requires a restart of all Application Servers.

Managing memcached Servers
To install memcached
See http://memcached.org/ for installation instructions.
To start memcached
  • Execute the memcached script located in the /bin directory:
./memcached -d start -p 11211 -u root -m 25
where:
  • -p is the port number (11211)
  • -u is the user (root)
  • -m is the amount of memory in MB (25)
(Change the parameters to the values used for your installation.)
To stop memcached
./memcached -d stop</tt>
Configuring Application Servers to Use memcached
To enable memcached
  1. Edit networking.properties
  2. Remove the leading # character from the line
#MemCachedServers=localhost:11211
To change the default port
The default port is 11211. To change the port assignment, modify the value(s) for MemCachedServers in networking.properties.
To configure multiple memcached instances
Multiple memcached instances are recommended, so that cache access is distributed. Do that by specifying the IP address and port for each memcache server in the networking.properties file.

Warn.png

Important: If there are multiple memcached servers, then:

  • Every instance should have an identical list of servers.
  • The servers should be in the same order in each list.
  • If the configuration changes, all application servers should be restarted.
Learn more: Adding Additional memcached Servers
To bring up the servers
After making the changes to the networking.properties files for all Application Servers, (re)start servers in the required Server Restart Sequence.