Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

feat(gateway): cache indexer response #389

Merged
merged 3 commits into from
Feb 13, 2023
Merged

Conversation

kckeiks
Copy link
Collaborator

@kckeiks kckeiks commented Feb 13, 2023

Why

Fixes #387

What

  • Add cache in resolver and cache responses from indexer.
  • Allow users to configure the cache.

Checklist

  • I have made corresponding changes to the tests
  • I have made corresponding changes to the documentation
  • I have run the app using my feature and ensured that no functionality is broken

@kckeiks
Copy link
Collaborator Author

kckeiks commented Feb 13, 2023

Numbers improved as expected. On average before adding the cache, the gateway was somewhere around ~3400 req/s and after adding the cache it was ~3900 req/s. The indexer was running locally. In production, there could potentially be more latency between indexer and gateway so the difference seen here could possibly be higher in prod.

@kckeiks kckeiks merged commit fe215f7 into main Feb 13, 2023
@kckeiks kckeiks deleted the feat/cache-indexer-query branch February 13, 2023 23:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(gateway): cache indexer response
3 participants