2 ms·
It's amazing how much this line of code actually makes happen; http.ListenAndServeTLS(":443", "cert.pem", "key.pem", nil)) A full HTTP and TLS stack ready t
by zaroth 11y ago
It's amazing how much this line of code actually makes happen;
http.ListenAndServeTLS(":443", "cert.pem", "key.pem", nil))
A full HTTP and TLS stack ready to start dispatching requests to your callbacks. I know there are other languages that can do the same, but I still think it's impressive. I've written just a few thousand lines of Go and while I'm pretty sure I'm not really "doing it right" I was able to port some decent complexity C# and very easily had all cores processing data at a higher overall rate with the Go code. High level libraries like this, and managed memory makes it almost feel like a scripting language, but with all the advantages of a compiler.
Operational question... If you're terminating client-side TLS like this, then does that mean either it's a single server or you have L4 (or lower) load balancing in front of it? I assume it's more common to have haproxy or nginx or something like that in front terminating TLS, with the API servers sitting behind.