Update README.md

This commit is contained in:
zandercymatics 2023-11-15 13:46:46 -07:00
parent dd3ea3870c
commit 240507246a
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7

View file

@ -294,7 +294,20 @@ it may help to resync your laptop with time.nist.gov:
sudo sntp -sS time.nist.gov
```
## Test if our connection pool is running
## Connection pool
To handle our connection to the registry, we utilize a connection pool to keep a socket open to increase responsiveness. In order to accomplish this, We are utilizing a heavily modified version of the (geventconnpool)[https://github.com/rasky/geventconnpool] library.
### Settings
The config for the connection pool exists inside the `settings.py` file.
| Name | Purpose |
| -------- | ------- |
| EPP_CONNECTION_POOL_SIZE | Determines the number of concurrent sockets that should exist in the pool. |
| POOL_KEEP_ALIVE | Determines the interval in which we ping open connections in seconds. Calculated as POOL_KEEP_ALIVE / EPP_CONNECTION_POOL_SIZE |
| POOL_TIMEOUT | Determines how long we try to keep a pool alive for, before restarting it. |
Consider updating the `POOL_TIMEOUT` or `POOL_KEEP_ALIVE` periods if the pool often restarts. If the pool only restarts after a period of inactivity, update `POOL_KEEP_ALIVE`. If it restarts during the EPP call itself, then `POOL_TIMEOUT` needs to be updated.
### Test if the connection pool is running
Our connection pool has a built-in `pool_status` object which you can call at anytime to assess the current connection status of the pool. Follow these steps to access it.
1. `cf ssh getgov-{env-name} -i {instance-index}`
@ -304,6 +317,6 @@ Our connection pool has a built-in `pool_status` object which you can call at an
3. `./manage.py shell`
4. `from epplibwrapper import CLIENT as registry, commands`
5. `print(registry.pool_status.connection_success)`
* (Should return true)
* Should return true
If you have multiple instances (staging for example), then repeat commands 1-5 for each instance you want to test.