forked from KumareshBabuNS/docs-cloud-cache
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html.md.erb
422 lines (346 loc) · 13.6 KB
/
index.html.md.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
---
title: Pivotal Cloud Cache
owner: Cloud Cache Engineers
---
## <a id='overview'></a>Overview
Pivotal Cloud Cache (PCC) is a high-performance, high-availability caching layer for Pivotal Cloud Foundry (PCF).
PCC offers an in-memory key-value store. It delivers low-latency responses to a large number of concurrent data access requests.
PCC provides a service broker to create in-memory data clusters on demand.
These clusters are dedicated to the PCF space and tuned for specific use cases defined by your service plan.
Service operators can create multiple plans to support different use cases.
PCC uses Pivotal GemFire. The [Pivotal GemFire API Documentation](http://gemfire-apis.docs.pivotal.io/) details the API for client access to data objects within Pivotal GemFire.
This documentation performs the following functions:
* Describes the features and architecture of PCC
* Provides the PCF operator with instructions for installing, configuring, and maintaining PCC
* Provides app developers instructions for choosing a service plan, creating, and deleting PCC service instances
* Provides app developers instructions for binding apps
## <a id='snapshot'></a>Product Snapshot
The following table provides version and version-support information about PCC:
<table class="nice">
<th>Element</th>
<th>Details</th>
<tr>
<td>Version</td>
<td>v1.4.0</td>
</tr>
<tr>
<td>Release date</td>
<td>January 30, 2018</td>
</tr>
<tr>
<td>Software component version</td>
<td>GemFire v9.3.0</td>
</tr>
<tr>
<td>Compatible Ops Manager version(s)</td>
<td>v1.12.x and v2.0.x</td>
</tr>
<tr>
<td>Compatible Elastic Runtime version(s)</td>
<td>v1.12.x</td>
</tr>
<tr>
<td>Compatible Pivotal Application Service (PAS)* version(s)</td>
<td>v2.0.x</td>
</tr>
<tr>
<td>IaaS support</td>
<td>AWS, Azure, GCP, OpenStack, and vSphere</td>
</tr>
<tr>
<td>IPsec support</td>
<td>Yes</td>
</tr>
</table>
\* As of PCF v2.0, _Elastic Runtime_ is renamed _Pivotal Application Service (PAS)_.
[//]: # (For more information, see [Pivotal Application Service (PAS) Highlights](http://docs.pivotal.io/pivotalcf/2-0/installing/highlights.html#ert). )
## <a id='other-services'></a> PCC and Other PCF Services
<%= partial '../../p-cloud-cache/odb/on-demand-service-table' %>
## <a id='architecture'></a>PCC Architecture
### <a id='GFBasics'></a>GemFire Basics
Pivotal GemFire is the data store within Pivotal Cloud Cache (PCC). A small amount of administrative GemFire setup is required for a PCC service instance, and any app will use a limited portion of the GemFire API.
The PCC architectural model is a client-server model. The clients are apps or microservices, and the servers are a set of GemFire servers maintained by a PCC service instance. The GemFire servers provide a low-latency, consistent, fault-tolerant data store within PCC.

GemFire holds data in key/value pairs. Each pair is called an **entry**. Entries are logically grouped into sets called regions. A region is a map (or dictionary) data structure.
The app (client) uses PCC as a cache. A cache lookup (read) is a get operation on a GemFire region. The cache operation of a cache write is a put operation on a GemFire region.
The GemFire command-line interface, called `gfsh`, facilitates region administration. Use `gfsh` to create and destroy regions within the PCC service instance.
### <a id='pcc-cluster-architecture'></a>The PCC Cluster
PCC deploys cache clusters that use Pivotal GemFire to provide high availability, replication guarantees, and eventual consistency.
When you first spin up a cluster, you have three locators and at least four servers.
<% mermaid_diagram do %>
graph TD;
Client
subgraph P-CloudCache Cluster
subgraph locators
Locator1
Locator2
Locator3
end
subgraph servers
Server1
Server2
Server3
Server4
end
end
Client==>Locator1
Client-->Server1
Client-->Server2
Client-->Server3
Client-->Server4
<% end %>
When you scale the cluster up, you have more servers, increasing the capacity of the cache. There are always three locators.
<% mermaid_diagram do %>
graph TD;
Client
subgraph P-CloudCache Cluster
subgraph locators
Locator1
Locator2
Locator3
end
subgraph servers
Server1
Server2
Server3
Server4
Server5
Server6
Server7
end
end
Client==>Locator1
Client-->Server1
Client-->Server2
Client-->Server3
Client-->Server4
Client-->Server5
Client-->Server6
Client-->Server7
<% end %>
### <a id='MemberCommunication'></a>Member Communication
When a client connects to the cluster, it first connects to a locator. The locator replies with the IP address of a server for it to talk to. The client then connects to that server.
<% mermaid_diagram do %>
sequenceDiagram
participant Client
participant Locator
participant Server1
Client->>+Locator: What servers can I talk to?
Locator->>-Client: Server1
Client->>Server1: Hello!
<% end %>
When the client wants to read or write data, it sends a request directly to the server.
<% mermaid_diagram do %>
sequenceDiagram
participant Client
participant Server1
Client->>+Server1: What's the value for KEY?
Server1->>-Client: VALUE
<% end %>
If the server doesn't have the data locally, it fetches it from another server.
<% mermaid_diagram do %>
sequenceDiagram
participant Client
participant Server1
participant Server2
Client->>+Server1: What's the value for KEY?
Server1->>+Server2: What's the value for KEY?
Server2->>-Server1: VALUE
Server1->>-Client: VALUE
<% end %>
## <a id='workflow'></a>Workflow to Set Up a PCC Service
The workflow for the PCF admin setting up a PCC service plan:
<% mermaid_diagram do %>
graph TD;
subgraph PCF Admin Actions
s1
s2
end
subgraph Developer Actions
s4
end
s1[1. Upload P-CloudCache.pivotal to Ops Manager]
s2[2. Configure CloudCache Service Plans, i.e. caching-small]
s1-->s2
s3[3. Ops Manager deploys CloudCache Service Broker]
s2-->s3
s4[4. Developer calls `cf create-service p-cloudcache caching-small test`]
s3-->s4
s5[5. Ops Manager creates a CloudCache cluster following the caching-small specifications]
s4-->s5
<% end %>
## <a id="service-network"></a>Networking for On-Demand Services
This section describes networking considerations for Pivotal Cloud Cache.
### <a id="bosh2"></a>BOSH 2.0 and the Service Network
<%= partial '../../p-cloud-cache/odb/service_networks' %>
### <a id ="architecture_networks"></a>Default Network and Service Network
Like other on-demand PCF services, PCC relies on the BOSH 2.0 ability to dynamically deploy VMs in a dedicated network. The on-demand service broker uses this capability to create single-tenant service instances in a dedicated service network.
<%= partial '../../p-cloud-cache/odb/on_demand_architecture' %>
The diagram below shows worker VMs in an on-demand service instance, such as RabbitMQ for PCF, running on a separate services network, while other components run on the default network.

### <a id="network-rules"></a>Required Networking Rules for On-Demand Services
<%= partial '../../p-cloud-cache/odb/service_networks_table' %>
<br>
Regardless of the specific network layout, the operator must ensure network
rules are set up so that connections are open as described in the table below.
<table class="nice">
<th>This component...</th>
<th>Must communicate with...</th>
<th>Default TCP Port</th>
<th>Communication direction(s)</th>
<th>Notes</th>
<tr>
<td><strong>ODB</strong></td>
<td>
<ul>
<li><strong>BOSH Director</strong></li>
<li><strong>BOSH UAA</strong></li>
</ul>
</td>
<td>
<ul>
<li>25555</li>
<li>8443</li>
</ul>
</td>
<td>One-way</td>
<td>The default ports are not configurable.</td>
</tr>
<tr>
<td><strong>ODB</strong></td>
<td><strong>Deployed service instances</strong>
</td>
<td>Specific to the service (such as RabbitMQ for PCF).
May be one or more ports.</td>
<td>One-way</td>
<td>This connection is for administrative tasks.
Avoid opening general use, app-specific ports for this connection.</td>
</tr>
<tr>
<td><strong>ODB</strong></td>
<td><strong>PAS (or Elastic Runtime) </strong>
</td>
<td>8443</td>
<td>One-way</td>
<td>The default port is not configurable.</td>
</tr>
<tr>
<td><strong>Errand VMs</strong></td>
<td>
<ul>
<li><strong>PAS (or Elastic Runtime) </strong></li>
<li><strong>ODB</strong></li>
<li><strong>Deployed Service Instances</strong></li>
</ul>
</td>
<td>
<ul>
<li>8443</li>
<li>8080</li>
<li>Specific to the service. May be one or more ports.</li>
</ul>
</td>
<td>One-way</td>
<td>The default port is not configurable.</td>
</tr>
<tr>
<td><strong>BOSH Agent</strong></td>
<td><strong>BOSH Director</strong>
</td>
<td>4222</td>
<td>Two-way</td>
<td>The BOSH Agent runs on every VM in the system, including the BOSH Director VM.
The BOSH Agent initiates the connection with the BOSH Director.<br>
The default port is not configurable. </td>
</tr>
<tr>
<td><strong>Deployed apps on PAS (or Elastic Runtime) </strong></td>
<td><strong>Deployed service instances</strong>
</td>
<td>Specific to the service. May be one or more ports.</td>
<td>One-way</td>
<td>This connection is for general use, app-specific tasks.
Avoid opening administrative ports for this connection.</td>
</tr>
<tr>
<td><strong>PAS (or Elastic Runtime) </strong></td>
<td><strong>ODB</strong>
</td>
<td>8080</td>
<td>One-way</td>
<td>This port may be different for individual services.
This port may also be configurable by the operator if allowed by the
tile developer.</td>
</tr>
</table>
### <a id ="WAN_details"></a>PCC Instances Across WAN
PCC service instances running within distinct PCF foundations
may communicate with each other across a WAN.
In a topology such as this,
the members within one service instance use their own private address space,
as defined in [RFC1918](https://tools.ietf.org/html/rfc1918).
A VPN may be used to connect the private network spaces that lay
across the WAN.
The steps required to enable the connectivity by VPN are dependent
on the IaaS provider(s).
The private address space for each service instance's network
must be configured with non-overlapping CIDR blocks.
Configure the network prior to creating service instances.
Locate directions for creating a network on the appropriate IAAS provider
within the section titled
[Architecture and Installation Overview](https://docs.pivotal.io/pivotalcf/installing/index.html).
## <a id='recommended-usage'></a>Recommended Usage and Limitations
- PCC supports the [look-aside cache pattern](./app-development.html#lookaside-cache).
- PCC stores objects in key/value format, where value can be any object.
- Any gfsh command not explained in the PCC documentation is **not supported**.
- PCC supports basic OQL queries, with no support for joins.
### Limitations
- Scale down of the cluster is not supported.
- Plan migrations, for example, `-p` flag with the `cf update-service` command, are not supported.
## <a id='security'></a>Security
Pivotal recommends that you do the following:
- Run PCC in its own network
- Use a load balancer to block direct, outside access to the Gorouter
To allow PCC network access from apps, you must create application security groups that allow access on the following ports:
* 1099
* 8080
* 40404
* 55221
For more information, see the PCF [Application Security Groups](https://docs.pivotal.io/pivotalcf/adminguide/app-sec-groups.html#creating-groups) topic.
PCC works with the IPsec Add-on for PCF.
For information about the IPsec Add-on for PCF,
see [Securing Data in Transit with the IPsec Add-on](https://docs.pivotal.io/addon-ipsec/index.html).
### Authentication
PCC service instances are created with three default GemFire user roles for
interacting with clusters:
- A cluster operator manages the GemFire cluster and can access
region data.
- A developer can access region data.
- A gateway sender propagates region data to another PCC service instance.
All client apps, gfsh, and JMX clients must authenticate as
one of these user roles to access the cluster.
The identifiers assigned for these roles are detailed in
[Create Service Keys](accessing-instance.html#create-service-key).
### Authorization
Each user role is given predefined permissions for cluster operations.
To accomplish a cluster operation,
the user authenticates using one of the roles.
Prior to initiating the requested operation,
there is a verification that the
authenticated user role has the permission authorized to do the operation.
Here are the permissions that each user role has:
- The cluster operator role has
`CLUSTER:MANAGE`,
`CLUSTER:WRITE`,
`CLUSTER:READ`,
`DATA:MANAGE`,
`DATA:WRITE`,
and `DATA:READ` permissions.
- The developer role has
`CLUSTER:READ`,
`DATA:WRITE`,
and `DATA:READ` permissions.
- The gateway sender role has `DATA:WRITE` permission.
More details about these permissions are in the Pivotal GemFire manual under [Implementing Authorization](http://gemfire.docs.pivotal.io/geode/managing/security/implementing_authorization.html).
## <a id='feedback'></a> Feedback
Please provide any bugs, feature requests, or questions to the [Pivotal Cloud Foundry Feedback list](mailto:[email protected]).