-
Notifications
You must be signed in to change notification settings - Fork 9
Description
Current configuration:
- main instance: EC2 on
t3.medium: https://eu-north-1.console.aws.amazon.com/ec2/home?region=eu-north-1#InstanceDetails:instanceId=i-0eda8ef302509bb14
Runs in node cluster mode (https://nodejs.org/api/cluster.html#cluster), started via PM2 (https://pm2.keymetrics.io/docs/usage/cluster-mode/) with -i max.
In case of t3.medium this effectively means 2 nodes.

Requires:
.secrets/warp-wallet-jwk.json- an Arweave wallet that is used to connect with Bundlr (which is used for bundling contracts and contracts' interactions).secrets/vrf-priv-key.txt-secp256k1private key - required by the VRF featurevrf-pub-key.txt-secp256k1public key - required by the VRF feature
Additional notes:
Only one worker in cluster runs the gateway tasks (e.g. transactions syncing, transactions verification)
All workers in cluster run the http server and handle both the POST and GET requests.
This is handled via gateway.lock file.
-
replica instance: EC2 on
t3.micro: https://eu-north-1.console.aws.amazon.com/ec2/home?region=eu-north-1#InstanceDetails:instanceId=i-0d80ce350fba0431c
Also runs in node cluster mode, with the--replicaparam. This effectively means, that node only serves data - i.e. serves only "GET" requests and does not run any tasks/jobs. -
ALB - https://eu-north-1.console.aws.amazon.com/ec2/home?region=eu-north-1#LoadBalancers:sort=loadBalancerName
sw-gw-albwithsw-gw-target-grouphttps://eu-north-1.console.aws.amazon.com/ec2/home?region=eu-north-1#TargetGroup:targetGroupArn=arn:aws:elasticloadbalancing:eu-north-1:731675056359:targetgroup/sw-gw-target-group/d11c3b67c5addb3a
This group has both the above EC2 instances connected. -
Cloudfront - https://us-east-1.console.aws.amazon.com/cloudfront/v3/home?region=eu-north-1#/distributions/E2UWDPG250O74Q - https://d1o5nlqr4okus2.cloudfront.net
with the alb and main instance node origins connected.
All the 'post' requests are sent to the main node.
The rest is sent to the ALB.
Some caching policies are enabled for certain endpoints - https://us-east-1.console.aws.amazon.com/cloudfront/v3/home?region=eu-north-1#/distributions/E2UWDPG250O74Q/behaviors
This cloudfront distribution is connected to the gateway.redstone.finance domain.