About Cloudflare's Durable Objects
pretzelbox.cc
pretzelbox.cc
> Say you need to maintain per user API usage counts. You could simply call the right Durable Object after fielding every request to update the usage count.
> Historically, API usage to be maintained by a database entry with a piece of compute running in front of it to handle updates.
With cloudflare workers and durable objects, complex operations(in terms of implementation) such as api usage and access limits can be handled easily.
You can both track and limit access(and cache at edge as a bonus) to api by simply using a worker on cloudflare with minimal development time and cost.
At some point I was thinking of offering the API as a service to users and I was trying to figure out the best way to go about the usage tracking. After doing some research, I realized that using cloudflare workers(with Do) would be an easy and nifty way to do it but never got around to actually implementing it.