Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add cache headers to /extended/v1/tx/:tx_id #1225

Closed
rafaelcr opened this issue Jul 4, 2022 · 1 comment · Fixed by #1229
Closed

add cache headers to /extended/v1/tx/:tx_id #1225

rafaelcr opened this issue Jul 4, 2022 · 1 comment · Fixed by #1229
Assignees
Labels
P2 Priority 2 Critical functionality not working Impacts one/few customers released
Milestone

Comments

@rafaelcr
Copy link
Collaborator

rafaelcr commented Jul 4, 2022

We currently don't add cache headers to /extended/v1/tx/:tx_id because its results may come from either the canonical chain or the mempool, and we don't have a cache handler that can deal with that variable scenario. This is causing that endpoint to produce spikes of ~10K uncached requests every ~10 minutes as some applications/marketplaces may be polling for some transactions continuously.

We should add an "adaptive" cache handler that would choose the correct ETag depending if the result came from the mempool or the canonical chain, and install it in that endpoint.

@rafaelcr rafaelcr moved this to Recent issues in API Board Jul 4, 2022
@rafaelcr rafaelcr added the P2 Priority 2 Critical functionality not working Impacts one/few customers label Jul 5, 2022
@rafaelcr rafaelcr moved this from Recent issues to Backlog in API Board Jul 5, 2022
@rafaelcr rafaelcr moved this from Backlog to In Development in API Board Jul 5, 2022
@rafaelcr rafaelcr self-assigned this Jul 5, 2022
Repository owner moved this from In Development to Done in API Board Jul 7, 2022
@blockstack-devops
Copy link

🎉 This issue has been resolved in version 4.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@sabbyanandan sabbyanandan added this to the Q3-2022 milestone Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Priority 2 Critical functionality not working Impacts one/few customers released
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants