cancel
Showing results for 
Search instead for 
Did you mean: 
Login & Join the DevCentral Connects Group to watch the Recorded LiveStream (May 12) on Basic iControl Security - show notes included.
George_Watkins_
Historic F5 Account

Problem this snippet solves:

Memcached is a general-purpose distributed memory caching system. It is used to cache frequently requested objects in memory for quick retrieval. Memcached cache hits alleviate application servers from otherwise expensive requests. Caching in this manner improves user experience and reduces load on application servers and databases.

Memcached standalone servers can provide a large performance boost to an application, but suffer from a few shortcomings: single point of failure, scale, and interface saturation. By placing a Memcached request routing virtual server in front of an array of Memcached servers, the load can be distributed across the array and minimize impact (cache misses) to application infrastructure in the event of a failure. A single Memcached server can only be scaled to capacities that are available and provide an adequate cost-benefit ratio. By leveraging Memcached request routing through BIG-IP, any caching server can be used regardless of its size (ratio CARP persistence was added in v11.3 to facilitate mixing different capacites). Finally, regardless of the capacity of the server's memory, it will always be limited by the throughput of its network interface. In order to scale beyond this limitation, a BIG-IP virtual server residing on a higher bandwidth interface can be used to aggregate the available bandwidth of all pool members.

Memcached key values are extracted from Memcached binary protocol. CARP, a consistent hashing algorithm, is used to hash the key and elect the best pool member for delivery. Consistent hashing algorithms ensure that if a pool member is lost, only the Memcached data residing on that server will need to be remapped. This prevents the healthy members data from needing to be remapped, which would result in a large number of cache misses similar to a single server failure. CARP allows for minimal impact in the event of failure as well as the ability to add capacity on demand. If servers of differing memory capacity are used, CARP weighting (ratio) is available as of BIG-IP version 11.3.

iApp Template Usage

Requirements

  • BIG-IP version: 11.0.0+
  • Memcached version: 1.3+ (binary protocol support)

Memcached Template

For improved readability, we suggest you click the Launch button to view the Help in a separate, resizable window.

This template creates a complete configuration optimized for managing traffic from most simple web server implementations. Before you start:

  • Check System :: Resource Provisioning to ensure that LTM (local traffic manager) is provisioned.
  • Set up VLANs to the servers containing the applications your clients will access.

Device and/or Traffic Groups

If you select Advanced from the Template selection list, you can select a device group that synchronizes BIG-IP configuration data among devices and a traffic group of related objects that fail over to another device when the current device becomes unavailable. Note: To use Device and/or Traffic Groups, you must configure them before running this iApp.

Virtual Server Questions

IP address

Type the IP address clients will use to access the Memcached array. The system creates a virtual server using this address.

Port

Type the associated service port. The default is 11211.

Route back to clients

Specify whether the servers can communicate with clients using a route you configured through the BIG-IP system to deliver response data to the client, or whether the BIG-IP system should translate the client's source address if needed to deliver response data to the client (default). Selecting No causes the BIG-IP system to use secure network address translation (SNAT) on the associated virtual server. In this case, the servers send response data to the BIG-IP system, which then translates the destination address and delivers response data to the client.

More than 64,000 connections

If you specified the servers do not have a route to clients, you must choose whether you expect more than 64,000 simultaneous connections per server. If you select No, the system uses the self-IP to automatically map to the IP address for the SNAT pool (SNAT automap). If you select Yes, a new row appears and you must specify at least one IP address for every 64,000 connections you expect (or fraction thereof). If you do not, after 64,000 connections, new requests fail.

Server Pool, Load Balancing, and Service Monitor Questions

New or existing Pool

If you plan to use an existing pool, select it from the list and continue to the next section. If you plan to create a new pool, complete this section.

Server address and port

Type the IP address and Port (default port is 11211) for each Memcached server that is a part of this deployment. You can optionally specify a Connection Limit. Click Add to include additional servers.

New or existing Monitor

If you plan to use an existing health monitor, select it from the list and continue to the next section. If you plan to create a new monitor, complete this section.

Health check interval

Type a number of seconds to set the health check interval. 30 is recommended.

Health check request

Optional. You can specify a specific request to pass to Memcached server. ASCII requests are supported. The default setting is to set an object called 'big-ip_monitor' to 'Hello World' with an expiry of 60s.

Health check response

Optional. Look for a response from the Memca

Protocol Optimization Questions

WAN or LAN

Specify whether clients are connecting over the LAN or WAN. This is used to set the proper TCP optimization type.

Finalize, View, and Change

Review your settings and selections. Be sure to follow the guidance in the Additional Steps section. Click Cancel to abandon all settings and return to the Application Services List screen. Click Repeat to create application objects and begin another application using the same settings (except Name). Click Finished to create the application objects. Once the application generates, you can see its elements by clicking the application's name in the Application Services List screen and clicking the Components tab. You can modify the application clicking the Reconfigure tab.

Version history
Last update:
‎11-Mar-2015 13:48
Updated by:
Contributors