by

API Gateway Regional vs. Edge-Optimized Endpoints

API Gateway recently launched regional endpoints, a deceivingly simple feature that has important implications:

  • lower latency for clients located in the same AWS region (i.e. running in EC2 or Lambda)
  • ability to manage your own CloudFront distribution or WAF for your API
  • ability to manage DNS routing for your custom domain name

In my opinion, the biggest win here is the ability to integrate Route53 DNS routing with your REST APIs. If you replicate your APIs to multiple regions (using OpenAPI import, for example), you can take advantage of powerful Route53 features such as latency-based routing, regional failover, and blue green deployments.

There are distinct advantages for both options. Here’s my personal take on when to use each:

When to use regional endpoints:

  • your clients are predominantly located in the same AWS regions (i.e. running in EC2 or Lambda)
  • you want to manage your own CloudFront distribution and use CloudFront features such as custom routing rules, edge caching, WAF, Lambda@Edge, etc
  • you want to take advantage of DNS routing for your custom domain name

When to use edge-optimized endpoints:

  • You have geographically distributed clients
  • You don’t want to pay for and manage your own CloudFront distribution

A note on latency benchmarking:

A common pattern I’ve seen is for developers to conduct performance tests against API Gateway with traffic originating from a single EC2 region, or worse, from a single development machine. These types of tests will likely produce better latency results using regional endpoints. However, keep in mind that if you have geographically distributed clients, synthetic tests will not represent the client experience. The best way to truly measure this is to track client-side latency metrics from your API clients.

Congrats to the API Gateway team on a very important release.

Cheers,

Ryan

Write a Comment

Comment

Webmentions

  • zithromax 250 mg over the counter

    buy zithromax 250 mg otc

    buy azithromycin otc

  • writing a critical essay

    write essays online https://onlinecasinos4me.com/

  • writing a literary analysis essay

    high school essay writing https://essaytag.com/

  • zithromax pill

    zithromax z-pak 250 mg

    zithromax for stds

  • legitimate essay writing service

    writing an essay for college https://essayghostwriter.com/

  • essay on writing

    custom writing essays https://essaywritercentral.com/

  • dating asian gay men

    gay online dating sites https://gaydatinglosangeles.com/

  • dating a gay man of color

    dean robert johnson gay dating https://gaydatingcanada.com/

  • what is a p top gay dating

    legit gay dating sites https://gay-singles-dating.com/

  • gay hiv positive dating

    asan gay dating site https://gayonlinedating.net/

  • interracial gay dating site

    gay police dating https://datinggayservices.com/

  • gay speed dating dallas tx

    cub gay dating https://gaychatgay.com/

  • ivermectin drug

    ivermectin orally

    order ivermectin 6mg for sale

  • dating gay bear

    middle school dating is gay https://freegaychatnew.com/

  • tips for gay dating

    gay teen diaper dating https://gaychatus.com/

  • keto diet bad for you

    keto diet protein intake https://ketodietione.com/

  • ivermectin otc

    order ivermectin online

    buy ivermectin online

  • stromectol 12 mg online

    ivermectin tablets for humans

    order stromectol 12mg

  • is zithromax a penicillin derivative

    zithromax dosage

    z-pack zithromax antibiotic and anxiety