What are the dangers of a long-lived TCP connection?
Golang
What are the consequences of creating a new HTTP client for each request?
How does an HTTP server work in Go?
Which protocols have you used most often and why?
package main import ( "io" "log" "net/http" ) func handler(w http.ResponseWriter, r *http.Request) { go func() { resp, err := http.Get("[link]") if err != nil { log.Println("request error:", err) return } defer resp.Body.Close() body, _ := io.ReadAll(resp.Body) w.Write(body) }() } func main() { http.HandleFunc("/proxy", handler) log.Fatal(http.ListenAndServe(":8080", nil)) }
How does TCP differ from UDP? What are the use cases?
Why does HTTP operate over TCP and not UDP?
Which message brokers have you worked with?
What is the purpose of passing metadata through context?
What network services have you worked with? API, gRPC, and anything else?
What load did your services handle?
What packages do you know in Go for network operations?
What happens when executing curl https://google.com?
What does the ampersand (&) before http.Client{} mean?
What are Latency, Throughput, MTU, and Keep-Alive?
Where else can UDP be used besides streams and games?
What is a context in Go and what is it used for?