A social media feed application built as a polyglot microservices system. Each service is written in a different language with zero pre-baked instrumentation -- designed to be a clean target for external observability tools (OTel Operator, sidecars, eBPF, etc.).
┌──────────────┐
│ data-gen │ (Python)
│ generates │
│ traffic │
└──────┬───────┘
│ HTTP calls to all services
┌───────────┬───────────┼───────────┬───────────┬───────────┐
▼ ▼ ▼ ▼ ▼ ▼
┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
│ user │ │ post │ │ comment │ │ like │ │ feed │ │ notif │
│ (Go) │ │ (Python) │ │(Node.js) │ │ (Rust) │ │ (Java) │ │ (.NET) │
│ :8081 │ │ :8082 │ │ :8083 │ │ :8084 │ │ :8085 │ │ :8086 │
└────┬─────┘ └────┬─────┘ └────┬─────┘ └──────────┘ └────┬─────┘ └──────────┘
│ │ │ │
▼ ▼ ▼ │
┌─────────────────────────────────┐ ┌─────────────┘
│ PostgreSQL │ │ calls post, comment,
│ :5432 │ │ like services to
└─────────────────────────────────┘ │ assemble feed
┌──────────┐ ┌──────────┐ │
│ Redis │ │ Kafka │ │
│ :6379 │ │ :9092 │◄─────────────────┘
└──────────┘ └──────────┘
| Service | Language | Port | Description |
|---|---|---|---|
| user-service | Go | 8081 | User registration and profiles (CRUD) |
| post-service | Python (FastAPI) | 8082 | Create and read posts |
| comment-service | Node.js (Express) | 8083 | Comments on posts |
| like-service | Rust (Axum) | 8084 | Like/unlike posts, like counts |
| feed-service | Java (Spring Boot) | 8085 | Aggregates posts + comments + likes into a feed |
| notification-service | .NET 8 (Minimal API) | 8086 | User notifications |
| data-generator | Python | - | Continuously generates traffic across all services |
| Component | Image | Port |
|---|---|---|
| PostgreSQL | postgres:16-alpine |
5432 |
| Redis | redis:7-alpine |
6379 |
| Kafka | bitnami/kafka:3.8 |
9092 |
cd social-feed
docker compose up --buildServices will be available at http://localhost:8081 through http://localhost:8086.
1. Build and push images to GHCR:
# Login to GHCR
echo $GITHUB_TOKEN | docker login ghcr.io -u <username> --password-stdin
# Build and push all 7 service images
./build-and-push.sh
# Or with a specific tag
./build-and-push.sh v1.0.02. Deploy (public images):
kubectl apply -f k8s/all-in-one-no-secret.yaml3. Deploy (private images -- requires pull secret):
# Create the namespace first
kubectl create namespace social-feed
# Create GHCR pull secret
kubectl create secret docker-registry ghcr-secret \
--namespace social-feed \
--docker-server=ghcr.io \
--docker-username=<github-username> \
--docker-password=<github-pat-token>
# Deploy
kubectl apply -f k8s/all-in-one.yaml| Image | Language |
|---|---|
ghcr.io/middleware-labs/social-feed-user-service |
Go |
ghcr.io/middleware-labs/social-feed-post-service |
Python |
ghcr.io/middleware-labs/social-feed-comment-service |
Node.js |
ghcr.io/middleware-labs/social-feed-like-service |
Rust |
ghcr.io/middleware-labs/social-feed-feed-service |
Java |
ghcr.io/middleware-labs/social-feed-notification-service |
.NET |
ghcr.io/middleware-labs/social-feed-data-generator |
Python |
Every service exposes a GET /health endpoint returning {"status": "ok"}.
GET /users-- list all usersPOST /users-- create user{"username", "email", "bio"}GET /users/{id}-- get user by ID
GET /posts-- list posts (optional?user_id=)POST /posts-- create post{"user_id", "content"}GET /posts/{id}-- get post by ID
GET /comments-- list comments (optional?post_id=)POST /comments-- create comment{"post_id", "user_id", "content"}GET /comments/{id}-- get comment by ID
POST /likes-- like a post{"post_id", "user_id"}GET /likes/{post_id}-- get like count for a post
GET /feed-- aggregated feed with posts, comments, and like counts (optional?user_id=)
GET /notifications/{userId}-- get notifications for userPOST /notifications-- create notification{"UserId", "Type", "Message"}POST /notifications/{id}/read-- mark notification as read
The data-generator service automatically:
- Waits for all services to be healthy
- Seeds 5 users and 5 posts on startup
- Continuously generates random traffic every ~5 seconds:
- Creates users (15%), posts (30%), comments (25%), likes (20%)
- Fetches the aggregated feed (5%)
- Sends notifications (5%)
Configure the interval with GENERATOR_INTERVAL_SEC env var (default: 5).
social-feed/
├── docker-compose.yml
├── build-and-push.sh
├── README.md
├── services/
│ ├── user-service/ # Go
│ │ ├── main.go
│ │ ├── go.mod / go.sum
│ │ └── Dockerfile
│ ├── post-service/ # Python
│ │ ├── main.py
│ │ ├── requirements.txt
│ │ └── Dockerfile
│ ├── comment-service/ # Node.js
│ │ ├── server.js
│ │ ├── package.json
│ │ └── Dockerfile
│ ├── like-service/ # Rust
│ │ ├── src/main.rs
│ │ ├── Cargo.toml
│ │ └── Dockerfile
│ ├── feed-service/ # Java
│ │ ├── src/.../FeedService.java
│ │ ├── pom.xml
│ │ └── Dockerfile
│ ├── notification-service/ # .NET
│ │ ├── Program.cs
│ │ ├── notification-service.csproj
│ │ └── Dockerfile
│ └── data-generator/ # Python
│ ├── generator.py
│ ├── requirements.txt
│ └── Dockerfile
└── k8s/
├── all-in-one.yaml # Everything (with imagePullSecrets)
├── all-in-one-no-secret.yaml # Everything (no secrets)
├── namespace.yaml
├── configmap.yaml
├── ghcr-secret.yaml
├── infrastructure/
│ ├── postgres.yaml
│ ├── redis.yaml
│ └── kafka.yaml
└── services/
├── user-service.yaml
├── post-service.yaml
├── comment-service.yaml
├── like-service.yaml
├── feed-service.yaml
├── notification-service.yaml
└── data-generator.yaml