For serverless solutions, you must give a try to cloudflare workers. They are not suitable for all the needs but if they fit your needs then cloudflare workers along with cloudflare complete ecosystem are just awesome.
Automatically our function replicated and is deployed all over the world instead of particular regions like with the traditional cloud functions. Thus, offering exceptional performance and scalability. Also you can also leverage Cloudflare’s network features, such as DNS, SSL/TLS, DDoS protection, firewall, caching, load balancing.
Cloudflare Workers include a distributed key-value store called Cloudflare Workers KV. This storage solution provides a simple way to persist and retrieve data across requests and deployments. KV is designed for high-read and low-write scenarios, where you need to access data quickly and frequently from multiple locations. Up to 25 MB of data can be stored in a key. However, I found issues if incoming request was having a large strigified body then cloudflare worker was rejecting it.
HTML Rewriter is a powerful tool that allows developers to modify HTML content in real-time at the edge. Technically, it is a streaming HTML parser and modifier. You can unleash all your creativity here to do wonders as it enables dynamic rewriting of web pages, making it possible to add, remove, or modify elements on the fly. It is a bit tricky to get your head around this but once your code works it will amaze you.
I hope this was helpful. Thanks for reading along. Let me know your feedback/suggestions in the comments.
- Ayush 🙂