Go pprof in Kubernetes: Remote Profiling & Flame Graphs

Go pprof in Kubernetes: Remote Profiling & Flame Graphs Answer-First: Remote profiling Go microservices in Kubernetes combines net/http/pprof endpoints with kubectl port-forward or continuous profilers like Pyroscope. This captures production CPU, heap, and goroutine profiles under real load with negligible overhead (<1% CPU) without exposing internal debug ports publicly. Production port forwarding configuration to profile CPU without service downtime. Decoding complex memory profiles and locating garbage collection allocation hot paths. You’ve instrumented your Go service with net/http/pprof, run go tool pprof locally against the development binary, and spotted the hot path in your flame graph. Then you deploy to Kubernetes and the bottleneck disappears — because the workload profile in Kubernetes differs from local testing (different request mix, connection pool pressure, GC behavior under actual memory pressure, scheduler interference from co-located pods). ...

June 1, 2026 · 16 min · Lê Tuấn Anh

Self-Hosting GraphHopper on Kubernetes with OSM Data

Self-Hosting GraphHopper on Kubernetes with OSM Data Answer-First: Self-hosting GraphHopper on Kubernetes with OpenStreetMap (OSM) data requires a StatefulSet with PVC persistent storage for PBF graph files, JVM memory heap tuning, and startup probe initial delays (300s+) to accommodate Contraction Hierarchies (CH) pre-computation without crash loops. PVC provisioning configurations for OSM PBF files in multi-region clusters. Tuning health probe timeouts to accommodate long graph pre-computation periods. GraphHopper is arguably the most capable open-source routing engine available — it supports Contraction Hierarchies (CH) for sub-millisecond route queries, custom vehicle profiles, turn restrictions, and the full OpenStreetMap road network. The problem most teams encounter is not the algorithm; it is the operational challenge of running it in Kubernetes: loading a large OSM PBF file, sizing JVM memory correctly, handling the long CH pre-processing startup time, and updating map data without downtime. ...

June 1, 2026 · 13 min · Lê Tuấn Anh