July 27th, 2024

Show HN: Burrow is a globally distributed, serverless HTTP proxy

Burrow is a serverless HTTP proxy for Go on AWS Lambda, supporting round-robin transport and Terraform deployment in 17 regions. Future updates will include API key authentication and user-driven features.

Read original articleLink Icon
Show HN: Burrow is a globally distributed, serverless HTTP proxy

Burrow is a serverless, globally-distributed HTTP proxy for Go, designed to operate on AWS Lambda. It is fully compatible with the standard Go `*http.Client` and implements the `http.RoundTripper` interface for proxying requests. Key features include support for round-robin transport, allowing automatic rotation through multiple Lambda functions across different regions, and Terraform configurations for deployment in 17 AWS regions.

To use Burrow, users can install it via the command `go get github.com/myzie/burrow`. A basic proxy setup involves creating an HTTP client with a specified proxy URL. For round-robin transport, users can define multiple proxy URLs and create a client that utilizes Burrow's round-robin transport feature. Multi-region deployment can be achieved using Terraform with a command to deploy to a specified S3 bucket for state management.

Future enhancements planned for Burrow include API key authentication and additional features based on user feedback. The repository provides example clients to illustrate usage, and contributions are encouraged under the Apache License 2.0. For further information, users can visit the GitHub repository.

Link Icon 4 comments
By @mlhpdx - 5 months
The amount of duplication in `main.tf` (copy/pasta for each region) is shocking, but I'm not a Terraform user -- is that normal? It also seems problematic for re-use since not all accounts have those regions enabled. Perhaps using something like the below to discover enabled regions at deploy time would make it more "consumable" by other folks:

  aws account list-regions \
    --region-opt-status-contains "ENABLED" "ENABLED_BY_DEFAULT" \
    --no-paginate \
    --query "Regions[].RegionName" \
    --output text
That's the approach I've taken with SAM/Cloudformation deployments[1].

[1] https://github.com/mlhpdx/email-origin/blob/main/scripts/dep...

By @kjok - 5 months
Very cool. Is there a reason to choose AWS lambda over other tech (say Cloudflare workers)?
By @jftuga - 5 months
Cool idea. What was your initial use case for creating this?

Also, are the Function URLs publicly accessible? If so, what safe guards are there to prevent abuse?