
ClickHouse Query Decomposition for Faster Metrics
Reworked a slow ClickHouse metrics query into a two-step strategy that materially reduced response time under production constraints.

Reworked a slow ClickHouse metrics query into a two-step strategy that materially reduced response time under production constraints.

Separated delivery-critical reads from analytics writes to protect webhook uptime while keeping reporting and monthly cost predictable.

Used integer keys for high-volume event joins and uuid-based public identifiers to prevent metadata leakage.

Built a queue-first webhook forwarding pipeline with retries and exponential backoff to avoid event loss during downstream downtime.

Implemented external cron triggering via EventBridge and Lambda to prevent duplicate scheduled runs in horizontally scaled backends.

Designed a hybrid tenancy model for a B2B marketplace with shared app infrastructure and per-tenant databases.