Hacker News new | ask | show | jobs
by myzie 689 days ago
Cloudflare Workers are great in general. The way they route client requests to the nearest Cloudflare data center means that a single client will most often end up with a small number (perhaps even 1) of public IP addresses coming out of Cloudflare. And to my knowledge, there's not a way to ask for your client to be routed in a different way. So due to this, AWS Lambda's inherent region-specific behavior is actually an advantage for Burrow, since we can ask to be routed through a specific region (no matter how distant) by virtue of hitting the per-region Lambda URLs.

That said, you could actually layer the two together if you were so inclined, and/or optionally route through Cloudflare and AWS.

Making the Cloudflare Worker implementation of this would be trivial and there's no dependency on Go in any way for the proxy itself.

1 comments

Indeed. As another example, I deploy regional API Gateways for "same region" access to service stacks and then tie them into the "global" service using Route53 latency based routing records (one per region). It works nicely to get the best of both worlds.
Nice. I was wondering if r53 latency-based routing would work as an optional add-on to this. I didn't look into it but was thinking it might not work because the latency based routing records are A records that have to point at a fixed IP address right (rather than the function url in my case). But presumably API gateway just gives you hostnames as well so maybe I'm mistaken here?
With API Gateway the resource has a formulaic domain name, but in Route53 that is hidden because you're creating an "alias" record. I'm not sure the same thing would apply to Lambda URLs.

It's not exactly what I'm talking about, which is unfortunately private source, but here's a close public example of something similar (MX records rather than A records). This template get's instantiated in each supported region (a small set, because SES email receiving is only supported in a handful of places):

https://github.com/mlhpdx/email-delivery/blob/master/templat...