Top Tweets for #goroutine
Started learning Go 3 weeks ago by building an HTTP/1.1 server from scratch over raw TCP. No frameworks, just protocol specs and goroutines.
Phase 1: Concurrent TCP ✅
Phase 2: HTTP parsing, keep-alive, request smuggling detection ✅

Go 1.28's HTTP/2 parking lets idle connection goroutines exit, cutting ~85–93 MiB RSS and 5,000 goroutines at 5,000 idle connections in one benchmark.
Go Weekly, 2026-10-26 ~ 2026-11-02: 14 posts. 4 worth your time:
1. Go 1.24+ on Linux listens with MPTCP by default, which the CVE-2026-98432 exploit needs. The post shows how to read the setting from a binary, disable it, and understand the limits.
2. Go shipped an urgent release in under 7.5 hours to block compromised eMudhra certificates, protecting TLS users. It also outlines future improvements.
3. anthropic-sdk-go v2 sends API version 2026-10-21, drops temperature, and moves the key to Authorization. The post runs old and new side by side to show compile errors and silent changes.
4. pgxpool defaults to max(4, NumCPU) connections, and the post shows how to use pool.Stat() to tell whether that is too small, with measured throughput from 4 to 64 connections.
All 14 links, grouped by topic:
https://t.co/0gJSFMx7mf
Go 1.28's HTTP/2 parking lets idle connection goroutines exit, cutting ~85–93 MiB RSS and 5,000 goroutines at 5,000 idle connections in one benchmark.
Go Weekly, 2026-10-26 ~ 2026-11-02: 14 posts. 4 worth your time:
1. Go 1.24+ on Linux listens with MPTCP by default, which the CVE-2026-98432 exploit needs. The post shows how to read the setting from a binary, disable it, and understand the limits.
2. Go shipped an urgent release in under 7.5 hours to block compromised eMudhra certificates, protecting TLS users. It also outlines future improvements.
3. anthropic-sdk-go v2 sends API version 2026-10-21, drops temperature, and moves the key to Authorization. The post runs old and new side by side to show compile errors and silent changes.
4. pgxpool defaults to max(4, NumCPU) connections, and the post shows how to use pool.Stat() to tell whether that is too small, with measured throughput from 4 to 64 connections.
All 14 links, grouped by topic:
https://t.co/0gJSFMx7mf
Go makes concurrency easier to work with. However, with great power comes great responsibility. If multiple goroutines access the same memory simultaneously, it can lead to unexpected behavior. Let’s see how this can happens:
https://t.co/S9X5nW2Tue

Ah, I'm reading about how GC and goroutines work, and things get crazy when you dive into threads, CPU, and memory allocation, like stack vs. heap. My mind literally freezes when I try to understand the HLD of all these things.
Ever encountered this error in Go?
fatal error: all goroutines are asleep - deadlock!
An unbuffered channel needs a receiver. Without one, the sender blocks.
Fix: Ensure a receiver can run, or use buffering when appropriate.
Remember: Blocking ≠ Deadlock.
#Golang
Building Setu (my Go LLM proxy gateway), spawning ad-hoc goroutines for async DB logging/spend updates worked fine until high load hit.
DB pool exhausted fast. 💥
Switched to buffered channels + a fixed worker pool.
Zero proxy latency hit. Protected Postgres. 🚀
#Golang

Learning Go concurrency.
100 goroutines → deposits
200 goroutines → withdrawals
Mutex → protects shared data
WaitGroup → waits for goroutines
100 × 100 = 10,000 deposited
100 withdrawals succeed, 100 fail
Final balance: 0
Simple example, but a great concurrency lesson.

Learning Go concurrency.
100 goroutines × 10 deposit = expected 1000.
But without synchronization, Balance += 10 can cause a race condition because multiple goroutines modify the same data.
WaitGroup → wait
Mutex → protect shared data
Small example, useful lesson.
#GoLang
@ranjitd18755665 A useful next sketch: two workers, three jobs, and a slow result consumer. Mark where each goroutine could be waiting. That’s the kind of moving-parts question I’m building @OpenLume to explain visually, with follow-ups while the lesson plays. https://t.co/rYBJ058Kae
Learning Go concurrency.
Today I understood the Worker Pool pattern: a fixed number of workers consume jobs from a shared channel and send results to another channel.
Key idea:
jobs <- x = send
x := <-jobs = receive
Small concept, but it made goroutines + channels much clearer

First time working with goroutines and channels in Go.
One key thing I understood: goroutines + channels allow us to build worker pools and pipelines where work can be distributed across multiple concurrent workers.

In Go, cancel() signals that work should stop; it doesn't wait for your goroutines to finish. Make the work observe ctx.Done(), propagate context to downstream calls, and coordinate shutdown separately. Cancellation and completion are different events.
Python: “I have the entire AI ecosystem.” 🧠
Go: “I have goroutines.” 🗿

The mixed I/O + CPU profile is the real tell. Node is fine until one 50k-file walk parks the loop, and then your p99 is decided by whoever showed up first. Go's cheap goroutines plus a static binary let you cap concurrency per stage instead of praying the pool behaves. One thing I'd add: put a bounded queue in front of the analysis step, so under burst you shed or delay rather than let RAM decide. Boring beats clever at 3am.
@VinijaJain this framing is good but I'd argue the harness matters more for concurrency-heavy code specifically... the model can write correct-looking goroutine code all day but without a harness step that actually runs -race it ships silently broken half the time
@prateet_tiwarii 0 B/op on the router is the part that makes me actually want to read the code. the circuit breaker cutting goroutine pileups is the real win too, thats the failure mode that takes a whole service down quietly
@shrey_sancheti Appreciate it!
No per-request worker spawning or channels, state evaluation is lock-free/atomic in-flight and timeouts are strictly bound via context.withtimeout on the transport,
so zero extra goroutines & no leaks
0 B/op on the router is impressive ngl.. for the circuit breaker are you bounding the goroutines with a fixed worker pool or spawning per request and killing on timeout ? the second approach bit me hard before, ended up with goroutines still alive hours after the parent context was already cancelled
Sentinel Update:
- Radix Tree Router (0 B/op)
- Atomic Round-Robin Load Balancer
- HTTP/TCP Health Prober
Next: A Circuit Breaker cutting off broken backends in microseconds, return instant 503s/fallbacks and eliminate goroutine pileups
https://t.co/PjLDIdjPC5
Day 9 of building an API Gateway in Go
gh-https://t.co/4jKwW5iLRQ
Added periodic concurrent health checks using goroutines, channels and time.Ticker.
Now the load balancer checks backend health every 5 seconds and automatically updates its server list when a backend goes down or comes back up.
Also added Mutex protected shared state, panic recovery and ReverseProxy reuse using a Go map.
#backend #APIGateway #buildinpublic #Go #Golang

@atulyasriv Make sure to bound that worker pool instead of spawning unbounded goroutines per tick. If backends hang, goroutines pile up fast and leak memory under load. Adding a tight context timeout to each check saved us a lot of headaches.
@atulyasriv channels for safety, goroutines for speed, love that combo
currently I handle network errors and timeouts through IsHealthy, but I have not added panic recovery inside each goroutine yet.
I do have a question though: is there anything in the current health check path that could realistically cause a panic?, since normal connection failures and timeouts are returned as errors rather than panics.
like if there is a probability then I will definitely add a deferred recovery function to return a default healthy: false Result.
@atulyasriv What about a goroutine that panics instead of timing out cleanly - does the channel just never receive and you hang on the aggregate select forever, or do you recover() inside each goroutine so one bad backend can't take the whole check down?
@Polaco23456 Yes, each health check has its own 2 second HTTP timeout, so one hanging backend does not block the others. The channel waits for all checks to return, but each goroutine is bounded by its own timeout.

@atulyasriv Concurrent health checks is the right move once you're past 2-3 backends. Is each goroutine on its own timeout so one hanging server doesn't stall the whole cycle, or does the channel just wait for all of them to report in?
Most Popular Users

Elon Musk 
@elonmusk
240M followers

Barack Obama 
@barackobama
118.6M followers

Cristiano Ronaldo 
@cristiano
114.4M followers

Donald J. Trump 
@realdonaldtrump
111.7M followers

Narendra Modi 
@narendramodi
106.9M followers

Rihanna 
@rihanna
98.6M followers

NASA 
@nasa
92.1M followers

Justin Bieber 
@justinbieber
91.7M followers

KATY PERRY 
@katyperry
89.9M followers

Taylor Swift 
@taylorswift13
83.9M followers

Lady Gaga 
@ladygaga
75.4M followers

Virat Kohli 
@imvkohli
73.3M followers

Kim Kardashian 
@kimkardashian
70.8M followers

YouTube 
@youtube
68.6M followers

Neymar Jr 
@neymarjr
66.3M followers

Bill Gates 
@billgates
65.2M followers

Selena Gomez 
@selenagomez
63M followers

The Ellen Show
@theellenshow
62.1M followers

CNN 
@cnn
61.7M followers

X 
@x
60.6M followers





















