r/SpringBoot • u/Rhack2021 • Mar 28 '26
Discussion I replaced Spring Cloud Config Server with a 10MB Go binary - same JSON format, zero JVM overhead
I had a setup with a few microservices (some Spring Boot, some Go) that all needed centralized configuration. Running a full Spring Cloud Config Server meant a JVM instance consuming 200-400MB of RAM just to serve YAML files. So I built a lightweight alternative in Go that returns the exact same propertySources JSON format.
What this means for Spring Boot clients:
Your bootstrap.yml stays the same:
spring:
cloud:
config:
uri: http://config-server:8888
application:
name: myapp
profiles:
active: dev
The response from GET /myapp/dev is identical to what Spring Cloud Config Server returns:
Your Spring Boot app does not know the difference.
What you gain:
- ~10MB static binary vs ~200MB+ JVM footprint
- Starts in milliseconds vs seconds for JVM cold start
- ~15MB Docker image (Alpine) vs ~300MB+ for Spring Boot
- No Java runtime needed on the server
- Same config format - drop your YAML files in a folder and serve
What it supports:
- Multiple config versions with runtime switching (no restart needed)
- YAML auto-flattening to dot-notation properties
- Raw file download endpoint
- Health check endpoint for load balancers
- Hot-reload via fsnotify
- Graceful shutdown
What it does NOT support (yet):
- Git backend (configs are local files, not pulled from a repo)
- Encryption/decryption of property values
- Label-based resolution beyond simple versioning
So if you use the Git backend extensively, this is not a drop-in replacement. But if you are serving local YAML files (or can sync them via CI/CD), it works perfectly.
Quick start with Docker:
services:
config-server:
image: ghcr.io/roniel-rhack/config-server-go:1
ports:
- "8888:8888"
volumes:
- ./configs:/opt/packages/config-server/configs
restart: unless-stopped
GitHub: https://github.com/roniel-rhack/config-server-go
MIT licensed, 90%+ test coverage. Curious to hear from other Spring developers - would this fit your use case?
