From 240507246a71e0c96e08155a4d58e49354778ac9 Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Wed, 15 Nov 2023 13:46:46 -0700 Subject: [PATCH] Update README.md --- docs/developer/README.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/docs/developer/README.md b/docs/developer/README.md index bee00f4b1..268bbe1bd 100644 --- a/docs/developer/README.md +++ b/docs/developer/README.md @@ -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. \ No newline at end of file