Python vs Go for Services
Language choice.
Overview
Python and Go both ship production services. The choice is workload-shaped, not taste-shaped. Pick Python where library ecosystem dominates the work; pick Go where runtime efficiency, deployment simplicity, or concurrency primitives dominate.
- Python ecosystem. Data science, ML tooling, scripting, ORMs, glue code, and a deep package index where the library you need probably exists.
- Go runtime. Static binaries, low memory floor, fast cold start, predictable garbage collection, native concurrency through goroutines and channels.
- Operational fit. Python wins when iteration speed matters most; Go wins when container density, latency, and steady-state cost matter most.
- Per-service decision and team fluency. Pick per service rather than per organisation, and weight current team fluency since the cost of a language nobody knows is paid every week.
The approach
Treat the choice as a small decision record. Name the workload, name the constraints, name the team skills, and pick. Re-run the decision when any of those inputs change.
- Workload-driven selection. CPU-bound numerical work and ML pipelines lean Python; high-concurrency network services and CLI tooling lean Go.
- Performance and footprint envelope. If you need sub-100ms tail latency at high RPS in a tight memory budget, Go's runtime is the safer default.
- Team fluency check. A language two engineers know cold beats a language nobody has shipped to production, regardless of benchmark wins.
- Document the choice and the trigger to revisit. Capture the rationale and the conditions that would flip it so the next team isn't relitigating from scratch.
Why this compounds
Language choice compounds because each new service inherits the runtime, the build pipeline, the observability surface, and the on-call muscle memory of the previous one. Picking deliberately keeps that surface small.
- Operational consolidation. Fewer runtimes mean fewer base images, fewer profilers, fewer crash modes for on-call to recognise.
- Hiring and onboarding. A documented choice tells candidates what they will work in and shortens ramp for new hires.
- Velocity through fluency. Teams ship faster in the language they know; matching workload to fluency multiplies throughput.
- Decision trail for the next service. Each documented choice teaches the next team what to evaluate, not which answer to copy.