The instructions below have been customized for your project "".
Customize these instructions for the project
Performance tweaks
Multiple approaches can be used to tweak the agent performance and resources usage.
Reverse proxy threads
As a reverse proxy, the redirection.io agent can handle a large number of requests, and it can be configured to optimize its performance in different ways. For example, you can configure the agent to use a specific number of worker processes, to enable or disable the use of HTTP/2 for backend connections, etc.
instance:
name: 'My Instance'
reverse_proxy:
listen:
- 'tcp://0.0.0.0:80'
forward:
address: 'backend:8080'
agent:
project_key: my-project-key
server_threads: 1
worker_threads: 4
worker_max_blocking_threads: 1024
The following configuration directives can be used to tweak the performance of the agent:
server_threads(default:1): the number of threads to use for handling incoming requests. By default, the agent uses a single thread for handling incoming requests, but you can increase this number to improve the performance of the agent when handling a large number of concurrent requests.worker_threads: the number of threads to use for handling the requests processing and forwarding to the backend. By default, the agent uses a number of worker threads equal to the number of CPU cores available, so there should be no need to configure this option in most cases.worker_max_blocking_threads(default:1024): the maximum number of threads to use for handling blocking operations.
Memory consumption
Other configuration directives can be used to limit the memory consumption. See this example:
instance:
name: 'My Instance'
cache: 10000
max_logs_buffer_size: 20000
reverse_proxy:
listen:
- 'tcp://0.0.0.0:80'
forward:
address: '127.0.0.1:8080'
agent:
project_key: my-project-key
In this example, the cache directive limits the number of compiled regular expressions that are stored in memory (for matching requests in a performant way), and max_logs_buffer_size limits the maximum number of logs that can be buffered in memory before being sent to the redirection.io platform (setting this to a very high value will use more memory if a lot of logs are collected in a short period).
Monitoring the performance
Remember that you're not blind when using the redirection.io agent! We offer ways to monitor the agent and check that it is working correctly.