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.
Supported metrics
OpsRamp Metric | Metric Display Name | Unit |
---|---|---|
twemproxy_curr_connections Number of current connections | Curr Connections | Connections |
twemproxy_total_connections Rate of new connections | Total Connections | Connections/second |
twemproxy_client_eof number of eof on client connections | Client Eof | Errors/second |
twemproxy_client_err number of errors on client connections | Client Err | Errors/second |
twemproxy_client_connections number of active client connections | Client Connections | Connections |
twemproxy_server_ejects number of times backend server was ejected | Server Ejects | Events |
twemproxy_forward_error number of times a forwarding error encountered | Forward Error | errors/second |
twemproxy_fragments number of fragments created from a multi-vector request | Fragments | requests/second |
twemproxy_in_queue number of requests in incoming queue | In Queue | requests/second |
twemproxy_out_queue number of requests in outgoing queue | Out Queue | requests/second |
twemproxy_in_queue_bytes current request bytes in incoming queue | In Queue Bytes | bytes/second |
twemproxy_out_queue_bytes current request bytes in outgoing queue | Out Queue Bytes | bytes/second |
twemproxy_server_connections number of active server connections | Server Connections | Connections |
twemproxy_server_err number of errors on server connections | Server Err | errors/second |
twemproxy_server_timedout number of timeouts on server connections | Server Timedout | Timeouts |
twemproxy_server_eof number of eof on server connections | Server Eof | errors/second |
twemproxy_responses number of responses | Responses | responses/second |
twemproxy_requests number of requests | Requests | requests/second |
twemproxy_response_bytes total response bytes | Response Bytes | bytes/second |
twemproxy_request_bytes total request bytes | Request Bytes | bytes/second |