ESI with Cloudflare over AWS API Gateway

#1

Hi there,

I am going to setup Cloudflare over AWS.

On AWS I have some static files on s3 and on Lambda I have a vue.js / nuxt.js serverside-rendered site with node.js

I would like to implement ESI for additional performance boost.

Do I just need to use ESI markup and be all good, or is ESI only available if I use Cloudflare Workers instead of Lambda?

If i researched right, an alternative would be Railgun.

Currently I think about this setup:

Cloudflare > API Gateway > AWS Lambda > Elasticsearch / S3

With Railgun it would be more like (if i am right):

Cloudflare -> EC2 -> API Gateway > AWS Lambda > Elasticsearch / S3

Can I expect more performance with Railgun if I already brotli files from AWS Lambda?

Thanks in advance
Philipp