Sobes.tech

What are the dangers of a long-lived TCP connection?

283

What are the consequences of creating a new HTTP client for each request?

256

Which protocols have you used most often and why?

233

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)) }

216

How does TCP differ from UDP? What are the use cases?

205

Why does HTTP operate over TCP and not UDP?

204

Which message brokers have you worked with?

203

What is the purpose of passing metadata through context?

202

What network services have you worked with? API, gRPC, and anything else?

192

What packages do you know in Go for network operations?

175

What happens when executing curl https://google.com?

175

What does the ampersand (&) before http.Client{} mean?

174

What are Latency, Throughput, MTU, and Keep-Alive?

150

Where else can UDP be used besides streams and games?

148

What is a context in Go and what is it used for?

102