I’m not entirely sure what’s being proposed, so let me break it down.
At the beginning of OCL client project, I had two options to deploy it: (a) as a static web page server / nginx docker container or (b) static resources served by S3/Cloudfront.
Due to the lack of senior frontend/react developers who could debug the eventual caching problems caused by having a CDN in front of your application, and as the download penalty is pretty much on the first request only, I thought the reasonable tradeoff was to ship as a docker container instead and avoid CDNs altogether. I don’t have the bandwidth or knowledge to handle cache invalidation problems that eventually arise from multiple deployments. Due to the pacific ocean, my loading times tend to be worse than most of the world, and it looks fine on cold cache for me.
That said, even if we serve the static files for the OCL client from a CDN, the actual user experience is affected by the latency of the backend.
If you want to add the the backend to the CDN, it’s a whole new world of cache complications. In order to benefit from caches for GET/HEAD, you need to carefully modify the application and the CDN config to know exactly what to answer and what to cache. It’s something I’ve managed to carefully avoid in my career, and some people make a living out of that.
We do have Cloudfront configured, we could see how expensive it would be to add OCL based on load if you have bandwidth to actually tune its cache policies.
I’m not entirely sure why you are proposing the move to AWS. If you are, you know that the docker-compose config is public to be copied. An EC2 instance is not going to provide any more availability guarantees than what we have right now, you wouldn’t gain any improvements in network latency across the world, you’d lose a lot of benefits you have now (network securities, OS patching, backups, https) that you’d have to configure or implement it yourself (if you don’t have someone that already did that for you). In all fairness, most of downtime we have right now is caused by our security patches being applied, which you are not going to be moving away from.
Maybe you could get away with ECS/Fargate or Beanstalk, still, you’d have to do a few tradeoffs. It’s always interesting to get developers to learn how to deploy their code as infrastructure, I’ve never got particularly good results.
If you require high availability, you’d probably have to change the architecture to allow multiple replicas of each component. Possible try to use managed services instead.
Now, I wouldn’t know what you mean by ‘serve different regions quickly’ if it’s not a CDN, which doesn’t require the backend to be in AWS anyway. I assume you didn’t mean keeping multiple copies of the backend and sync’ng the datastorage.