Skip to content

Configuring EVCache Client

Shashi Madappa edited this page Mar 11, 2016 · 3 revisions

Below are the set of properties that needs to be set to customize EVCache client. These properties can be set as Java System property [System.setProperty(key, value)] or using [Netflix Archaius](https://github.com/Netflix/archaius). All the below properties can be changed dynamically at runtime and will take effect soon after the change.

Prop Name Name Description Type Default Valid Values
<App>.EVCacheClientPool.readTimeout Read Timeout The max time in milli-seconds the client waits to retrieve the value from EVCache. Int 20 1 and above
<App>.EVCacheClientPool.poolSize Pool Size Number of connections from a Client to a memcached host Int 1 1 and above
<App>.fallback.zone Zone Fallback On a cache miss should the EVCache client try to fall through to other Server Groups to get the requested data Boolean true true or false
<App>.bulk.fallback.zone Zone Fallback On a cache miss for Bulk Operations should the EVCache client try to fall through to other Server Groups to get the requested data Boolean true true or false
<App>.bulk.partial.fallback.zone Zone Fallback If few of the keys are missing for Bulk Operations should the EVCache client try to fall through to other Server Groups to get the missing data Boolean true true or false
<App>.<Zone>.EVCacheClientPool.writeOnly or <App>.<ServerGroup>.EVCacheClientPool.writeOnly Write Only mode In this mode that server group which is in “write only” accept only writes and all the reads go to other server groups that have read enabled. This is helpful to do any maintenance on the servers by restarting or replacing them. This approach ensures the hit rate is not affected. Boolean false true or false
<App>.failure.mode Failure Mode If a EVCache operation fails due to any EVCache Node issue (Ex network connectivity, instance crash) then you can either retry or cancel the operation String Cancel Cancel, Redistribute or Retry

##Max Operation Queue Size for Write Operations To control how many write operations can be queued before we start to reject by specifying the below property

<EVCache App Name>.max.queue.length=16384

# Default : 16384

##Max Write Timeout By default the write operations are timed out after 2500 milli-seconds. To increase it set the below property to the desired value.

<EVCache App Name>.operation.timeout=2500

# Default : 2500

*** ### Chunking You can optionally chunk data into multiple chunks. This is helpful if you want to store large items by splitting them into smaller chunks. There is a slight overhead while reading or writing the data but chunking ensures that when the sizes of the items changes there are no evictions due to items migrating across memcached slabs.

<EVCache App Name>.chunk.data=true

# Default : false

**Chunk size** To control the size of each chunk specify the following property

<EVCache App Name>.chunk.size=1180
# Default: 1180

***

### InMemory Cache You can optionally cache data in EVCache on the client’s memory. This can be an effective approach when the data for the same is requested frequently in a tight loop. It can also be used to front immutable data.

<EVCache App Name>.<cache name>.use.inmemory.cache=true
# Default: false

**InMemory Cache size** To control how many items can be cached in memory specify the following property

<EVCache App Name>.inmemory.cache.size=100
# Default: 100

**InMemory Cache Duration** To control the max time in milliseconds that an item can cached in memory specify the following property

<EVCache App Name>.inmemory.cache.duration.ms=100
# Default: 100

***

### Exception Propagation By default exceptions are not thrown by EVCache client. If data is not found in the memached host null is returned. To enable throwing of exceptions set the below property.

<EVCache App Name>.throw.exception=true

To enable only for a cache name

<EVCache App Name>.<cache name>.throw.exception=true

***

Clone this wiki locally