1: <?php
2: /**
3: * PHP OpenCloud library.
4: *
5: * @copyright Copyright 2013 Rackspace US, Inc. See COPYING for licensing information.
6: * @license https://www.apache.org/licenses/LICENSE-2.0 Apache 2.0
7: * @version 1.6.0
8: * @author Glen Campbell <glen.campbell@rackspace.com>
9: * @author Jamie Hannaford <jamie.hannaford@rackspace.com>
10: */
11:
12: namespace OpenCloud\LoadBalancer\Resource;
13:
14: /**
15: * Session persistence is a feature of the load balancing service that forces
16: * multiple requests, of the same protocol, from clients to be directed to the
17: * same node. This is common with many web applications that do not inherently
18: * share application state between back-end servers. Two session persistence
19: * modes are available, as described in the following table:
20: *
21: * * HTTP_COOKIE: A session persistence mechanism that inserts an HTTP cookie
22: * and is used to determine the destination back-end node. This is supported
23: * for HTTP load balancing only.
24: *
25: * * SOURCE_IP: A session persistence mechanism that will keep track of the
26: * source IP address that is mapped and is able to determine the destination
27: * back-end node. This is supported for HTTPS pass-through and non-HTTP
28: * load balancing only.
29: */
30: class SessionPersistence extends SubResource
31: {
32: /**
33: * Mode in which session persistence mechanism operates. Can either be set
34: * to HTTP_COOKIE or SOURCE_IP.
35: *
36: * @var string
37: */
38: public $persistenceType;
39:
40: protected static $json_name = 'sessionPersistence';
41: protected static $url_resource = 'sessionpersistence';
42: protected $createKeys = array('persistenceType');
43:
44: }
45: