Skip to content

Connection pool - #13

Open
282000ypk wants to merge 2 commits into
mainfrom
connection_pool
Open

Connection pool#13
282000ypk wants to merge 2 commits into
mainfrom
connection_pool

Conversation

@282000ypk

Copy link
Copy Markdown
Collaborator
  • Completely remove the existing retry mechanism (including for GET calls)

  • Connection pool implementation for API requests, with the following defaults, all configurable at the merchant (client instance) level:
    - Pool size: 10 connections (default)
    - Keep-alive: 60s for these connections (default)
    - Connect timeout: 3s (default)
    - Request (read) timeout: 30s (default), considering autoPay APIs

  • Update the TokenFetch Service as follows:
    - Token should be fetched at instance creation itself instead of waiting for any operation
    - In case the first token fetch fails, it can be retried
    - Subsequent tokens should be refreshed at half the time before expiry. In case of refresh failure, it can be retried until the token expires
    - The token refresh strategy should include a lock mechanism: once the token is refreshed and updated, it should be locked so that no thread other than the refresh thread can modify it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant