I have a server running on AWS which serves data, that is not changing too often (think about a CMS system) to multiple clients.
This service is critical for most of the client apps, thus I want to take some load off of it. I wanted to introduce another service between the clients and the server with a (Redis) cache with the intention that this way the middle layer will mostly serve cached data and only call my "critical" Rest Api when the cache is invalidated (e.g. by the critical server itself).
However, I was thinking why would I keep up a server just to act as a caching layer or middleman when I could use a CDN like Cloudflare to do this?
- Is my approach a sufficient one to protect my "critical" service?
- Do you have a better alternative?
- How do I set this up on Cloudflare, and is there a way my "critical" server can call Cloudflare to flush the cache when the data is updated?