twemproxy, aka nutcracker is a fast and lightweight proxy for memcached and redis protocol. It reduces the number of connections to the caching servers on the backend. This, together with protocol pipelining and sharding enables you to horizontally scale your distributed caching architecture.
Prerequisite
For Virtual machines, install the Linux agent.
Configuring the credentials
Configure the credentials in the directory /opt/opsramp/agent/conf/app.d/creds.yaml
twemproxy:
- name: twemproxy
user: <username>
pwd: <Password>
encoding-type: plain
labels:
key1: val1
key2: val2
Configuring the application
Virtual machine
Configure the application in the directory /opt/opsramp/agent/conf/app/discovery/auto-detection.yaml
- name: twemproxy
instance-checks:
service-check:
- nutcracker
process-check:
- nutcracker
port-check:
- 22222
Docker environment
Configure the application in the directory /opt/opsramp/agent/conf/app/discovery/auto-container-detection.yaml
- name: twemproxy
container-checks:
image-check:
- twemproxy
port-check:
- 22222
Kubernetes environment
Configure the application in config.yaml
- name: twemproxy
container-checks:
image-check:
- twemproxy
port-check:
- 22222
Validate
Go to Resources under the Infrastructure tab to check if your resources are onboarded and the metrics are collected.
Metrics
OpsRamp Metric | Metric Display Name | Unit | Description |
---|---|---|---|
twemproxy_curr_connections | Curr Connections | Connections | Number of current connections |
twemproxy_total_connections | Total Connections | Connections/second | Rate of new connections |
twemproxy_client_eof | Client Eof | Errors/second | number of eof on client connections |
twemproxy_client_err | Client Err | Errors/second | number of errors on client connections |
twemproxy_client_connections | Client Connections | Connections | number of active client connections |
twemproxy_server_ejects | Server Ejects | Events | number of times backend server was ejected |
twemproxy_forward_error | Forward Error | errors/second | number of times we encountered a forwarding error |
twemproxy_fragments | Fragments | requests/second | number of fragments created from a multi-vector request |
twemproxy_in_queue | In Queue | requests/second | number of requests in incoming queue |
twemproxy_out_queue | Out Queue | requests/second | number of requests in outgoing queue |
twemproxy_in_queue_bytes | In Queue Bytes | bytes/second | current request bytes in incoming queue |
twemproxy_out_queue_bytes | Out Queue Bytes | bytes/second | current request bytes in outgoing queue |
twemproxy_server_connections | Server Connections | Connections | number of active server connections |
twemproxy_server_err | Server Err | errors/second | number of errors on server connections |
twemproxy_server_timedout | Server Timedout | Timeouts | number of timeouts on server connections |
twemproxy_server_eof | Server Eof | errors/second | number of eof on server connections |
twemproxy_responses | Responses | responses/second | number of responses |
twemproxy_requests | Requests | requests/second | number of requests |
twemproxy_response_bytes | Response Bytes | bytes/second | total response bytes |
twemproxy_request_bytes | Request Bytes | bytes/second | total request bytes |