Category: Uncategorized

  • Building a Cost-Aware Kubernetes Autoscaler with Karpenter

    Default Kubernetes cluster autoscaler treats all nodes equally, which leads to surprisingly expensive infrastructure bills when your workloads have mixed resource profiles. We built a custom Karpenter provisioner configuration that reduced our AWS compute costs by 34% without affecting application performance.

    The key insight was separating workloads into three tiers based on their interruption tolerance. Batch jobs and dev environments run on spot instances with Karpenter consolidation enabled. Stateless API servers use a mix of on-demand and spot with automatic failover. Stateful services like databases and message queues stay on dedicated on-demand instances with local NVMe storage.

    We also implemented a custom webhook that injects resource requests based on historical usage data from our Prometheus metrics, solving the chronic under-requesting problem that plagues most Kubernetes deployments.

  • Zero-Downtime Database Migrations with gh-ost and pt-online-schema-change

    Schema migrations on large MySQL tables remain one of the hardest operational challenges in production systems. We evaluated gh-ost and pt-online-schema-change for our 800GB user table and found significant differences in replication lag handling, throttling behavior, and cutover safety.

    gh-ost operates without triggers by tailing the binary log directly, which eliminates the write amplification problem that pt-osc introduces. However, gh-ost requires binlog_format=ROW and has stricter requirements around foreign keys and generated columns.

    For PostgreSQL shops, we have been impressed with pgroll, which uses a shadow-column approach combined with database-level views to provide zero-downtime migrations without the operational complexity of trigger-based tools.

  • Migrating from Docker Compose to Kubernetes: Lessons from Production

    After running our microservices on Docker Compose for three years, we finally migrated to Kubernetes. Here is what we learned about converting compose files to Helm charts, handling persistent volumes, and managing the inevitable networking differences.

    The biggest surprise was not the migration itself but the operational tooling gap. Compose gives you docker-compose logs and that is about it. Kubernetes opens up an entire ecosystem of observability tools, but choosing between Prometheus, Datadog, Grafana Cloud, and New Relic consumed more engineering time than the actual migration.

    Our recommendation: start with kube-prometheus-stack and add complexity only when you have a specific observability gap. Most teams over-instrument on day one and spend months tuning alert fatigue.

  • Hello world!

    Welcome to WordPress. This is your first post. Edit or delete it, then start writing!