This application has 3 parts:
The core application is a Fauna Cloudflare workers serverless REST api. The application is globally distributed by default. Meaning, data and compute always happens closer to the user's location minimizing latency.
You will find the code for this in the cf-fauna
folder. Follow this tutorial on Fauna + Cloundflare to learn more.
There is a simple node.js server that is provided in the ec2-app
folder. You can deploy this node.js server in multiple geolocation and interact with the Cloudflare workers + Fauna REST api from there.
A react application is in frontend
folder. The React application make requests to the ec2 servers in various location demostrating that the ec2 servers recieve data from the Fauna Cloudflare serverless REST api in almost same time.
Frontend application is deployed at