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

rpc request: viable to cache with normal http caching #21

Open
pkieltyka opened this issue Feb 7, 2019 · 1 comment
Open

rpc request: viable to cache with normal http caching #21

pkieltyka opened this issue Feb 7, 2019 · 1 comment
Projects

Comments

@pkieltyka
Copy link
Member

the design of webrpc is to HTTP-POST to /rpc/<serviceName>/<rpcMethod> a structured JSON string to the webrpc server. Great.. but, as the input argument is sent as the request body, can nginx/CloudFlare/other services use that request body to generate a cache-key needed for basic cache-control rules?

the standard way is to use the URI + query string to generate a cache string -- but, right now, the URI/query string would be the same for all requests in webrpc. But certainly some method calls could be cacheable, so let's make sure we can support it as its the easiest first step to scalability. Some ideas how to make these rpc requests cachable..

  1. out of the box support? maybe web servers like nginx already support a way to generate a cache-key for a request body?
  2. CloudFlare workers? CF rules, and their new workers stuff looks very flexible, we could probably make it work there
  3. Add a request mode in webrpc server to take the request as a query string, which would bring us back to normal http request world, and that could be okay but less ideal then option 1 or 2 above
@pkieltyka pkieltyka added this to Backlog in v1 Feb 7, 2019
@pkieltyka pkieltyka moved this from Backlog to Queued in v1 Feb 7, 2019
@pkieltyka
Copy link
Member Author

in order to support this, an easy way is to support GET http method and arguments as query params

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
v1
  
Queued
Development

No branches or pull requests

1 participant