apex / up

Deploy infinitely scalable serverless apps, apis, and sites in seconds to AWS.
https://up.docs.apex.sh
MIT License
8.79k stars 374 forks source link

Zero-overhead native Go support #543

Open tj opened 6 years ago

tj commented 6 years ago

Currently there's a local proxy Up Proxy -> Your App, however with native Go we could now let you run native Go apps without the proxy, by embedding it, something like:

func main() {
  up.Handle(h)
}

Honestly I think the latency benefits would be negligible, but it's worth investigating. Another benefit would be that you can shave ~3mb off your deploy size (and time).

TL;DR this keeps all of the Up proxy features, with none of the overhead.

franciscocpg commented 6 years ago

Maybe this could help somehow? https://github.com/akrylysov/algnhsa

tj commented 6 years ago

@franciscocpg https://github.com/apex/gateway — looks similar haha. Honestly it's not a big win over using the shim. I'd still like to add it, but it's not a huge priority.

franciscocpg commented 6 years ago

ops, didn't know it :raised_hands:

tshak commented 6 years ago

Unless there's something incredibly wrong with how I've implemented golang support, the differences are not significant. https://gist.github.com/tshak/7fa2c7803ae5a27f66441752d1bd8e45