Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use CDN for Explorer #445

Open
Tracked by #78
kj4ezj opened this issue Apr 11, 2023 · 2 comments
Open
Tracked by #78

Use CDN for Explorer #445

kj4ezj opened this issue Apr 11, 2023 · 2 comments
Assignees
Labels
Infrastructure Cloud infrastructure

Comments

@kj4ezj
Copy link
Contributor

kj4ezj commented Apr 11, 2023

Following issue 404 and engineering issue 38, this task is to retrofit the cloud infrastructure for the EVM explorer websites to use a content delivery network (CDN).

The testnet explorer currently uses a load balancer, and the mainnet explorer uses a load balancer behind a global accelerator. This is great, but a CDN would be substantially faster for clients outside of North America and Europe.

If there is some reason a CDN cannot be used, the testnet explorer should also be put behind a global accelerator.

Strategy

We will start with the testnet explorer, then implement a CDN for the mainnet explorer if and only if it is a sure thing - we got everything working on the testnet with the CDN, the process is well understood, and there is minimal risk to causing downtime for mainnet endpoints. The existing infrastructure shall not be torn down until the CDNs are complete and verified working in a number of cities across the globe using a virtual private network (VPN). This enables us to fall back to the existing infrastructure quickly in the face of downtime.

The good news is that we can test with the CDN distribution URI before we change the DNS records. The CDN changes will not impact the community until the DNS records are changed for the published endpoints. On the testnet, we also have certificates issued for a subdomain (beta.explorer.testnet.evm.eosnetwork.com.) so we can also test the HTTPS wiring with an ENF domain name using the CDN before deploying a change which could potentially cause downtime for customers.

Acceptance Criteria

  1. A CDN was deployed for the testnet explorer.
  2. If:
    1. the distribution URL worked, and;
    2. the "beta" subdomain worked using HTTPS with HTTP disallowed, then;
    3. the testnet CDN was deployed to the published testnet endpoint.
  3. If the testnet CDN worked end-to-end, then a CDN is deployed for the mainnet explorer.
  4. If the mainnet CDN worked using the distribution URI, then the CDN is deployed to the mainnet endpoint.
  5. If the above steps failed, an AWS Global Accelerator is put in front of the testnet explorer.
  6. HTTP is disabled (using a 301 redirect to HTTPS) for all explorer endpoints on both networks.
  7. All unused explorer infrastructure is torn down.
@kj4ezj kj4ezj added the Infrastructure Cloud infrastructure label Apr 11, 2023
@kj4ezj kj4ezj self-assigned this Apr 11, 2023
@kj4ezj
Copy link
Contributor Author

kj4ezj commented May 4, 2023

This was placed in the icebox sometime on or before April 13th. We decided to use load balancers instead because, even though it is less performant and possibly more work to implement, it was a "sure thing" to meet the release deadline.

I put the load balancers behind an AWS Global Accelerator to partly meet the needs of this ticket. Global accelerators use the same AWS edge nodes as CloudFront to provide DDoS protection, global fault tolerance, increase throughput by ~90%, and decrease latency by ~50%. My customers were very satisfied with the improvements in performance! However, global accelerators do not cache content at the edge locations. We should still switch the explorer to a CDN at some point in the future.

@Joshua2Mars
Copy link

Needs to confirm if it's complete or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Infrastructure Cloud infrastructure
Projects
Status: Icebox
Status: Todo
Development

No branches or pull requests

2 participants