department-of-veterans-affairs / va.gov-cms

Editor-centered management for Veteran-centered content.
https://prod.cms.va.gov
GNU General Public License v2.0
97 stars 69 forks source link

[Forms] SPIKE: Caching for VA Forms API #15359

Open dsasser opened 1 year ago

dsasser commented 1 year ago

Description

Research if adding caching (Redis, other) to VA Forms API would positively impact the Veteran experience.

Background

The VA Forms API gets heavy traffic spikes at times, which has caused some issues with the API returning 5xx responses, causing Veterans the inability to access their necessary forms.

[todo: link to issues, slack threads, etc].

User story

AS A Veteran or other user of forms available via VA.gov I WANT to have access to the forms I need without encountering any errors SO THAT I can complete them without frustration and get the services/aid/etc. that I need

Engineering notes / background

With no caching in place, each and every request to the VA Forms API is routed through Lighthouse and ultimately to the postgres database.

In order to understand what our caching options are, we need to explore the path a request takes from browser to Lighthouse. We may find that implementing a Redis cache at the /v0/forms endpoint could greatly impact the Veteran performance. Or, we may find that the path to the /v0/forms endpoint takes won't allow for an in-memory cache. In that case, perhaps there is an HTTP proxy cache we could leverage.

Analytics considerations

Quality / testing notes

Acceptance criteria

FranECross commented 3 months ago

Removed from [this epic](Monitoring enhancements for API-driven Public Websites products#15262), and added to the Misc API Q3 2024 epic.