<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Rajath Ramesh on Medium]]></title>
        <description><![CDATA[Stories by Rajath Ramesh on Medium]]></description>
        <link>https://medium.com/@rajathramesh?source=rss-a8904b3da070------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*TX-Xhn_ZsvuMizxr0KoYeQ.png</url>
            <title>Stories by Rajath Ramesh on Medium</title>
            <link>https://medium.com/@rajathramesh?source=rss-a8904b3da070------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 11:42:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rajathramesh/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Framework and Service Builder: From Zero to Production-Ready in One Command]]></title>
            <link>https://medium.com/carousell-insider/framework-and-service-builder-98b46db2db4c?source=rss-a8904b3da070------2</link>
            <guid isPermaLink="false">https://medium.com/p/98b46db2db4c</guid>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[agentic-engineering]]></category>
            <category><![CDATA[developer-experience]]></category>
            <category><![CDATA[platform-engineering]]></category>
            <dc:creator><![CDATA[Rajath Ramesh]]></dc:creator>
            <pubDate>Fri, 26 Jun 2026 05:11:48 GMT</pubDate>
            <atom:updated>2026-06-26T05:11:48.224Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cszHaC_yT_CNScfbZm7qPw.png" /></figure><p><em>How we rebuilt our backend framework and service scaffolding tool to integrate every platform initiative into a single workflow, and sneak peak on how AI agents are now taking it further.</em></p><p>Co-Authored with: <a href="https://www.linkedin.com/in/edward-samuel-pasaribu/">Edward</a>, <a href="https://www.linkedin.com/in/praveen-sanap-48208951/">Praveen</a> and <a href="https://www.linkedin.com/in/vipulsodha/">Vipul</a></p><p>This is the final post in our <a href="https://medium.com/carousell-insider/common-tech-foundation-carousell-group-ac1b11aefedf">Group Infrastructure Platform</a> series. In previous posts we covered <a href="https://medium.com/carousell-insider/service-definition-6125e61e2326">Service Definition</a>, <a href="https://medium.com/carousell-insider/api-definition-and-protobuffer-management-1e28b02e9b18">API Definition</a>, <a href="https://medium.com/carousell-insider/secret-and-configuration-management-auditable-api-first-and-secure-at-scale-def805774be2">Secret &amp; Config Management</a>, and <a href="https://medium.com/carousell-insider/unified-service-deployment-across-carousell-group-cc5f7fd9103f">Service Deployment</a>. Each is a standalone platform component. But the magic happens when they all come together, and that’s what the <strong>Framework</strong> and <strong>Service Builder</strong> deliver.</p><h3>The Problem with the Old Builder</h3><p>Our previous scaffolding tool, Orion-Builder, had served Carousell well but showed its age:</p><p><strong>Limited input.</strong> It only took a service name (which had to be camelCase) as input. Everything else was hardcoded defaults.</p><p><strong>Unused boilerplate.</strong> Every new service started with a sample Echo RPC implementation that engineers had to manually delete. Some services still had it in production.</p><p><strong>Infrastructure scripts in every repo.</strong> Critical scripts like start_prod were committed to each service repo. A change to the startup sequence required updating scripts across all services one by one, with no controls over incorrect modifications.</p><p><strong>No cross-BU support.</strong> Orion-Builder was built for CRS only. Services generated for Cho Tot or Mudah required manual adaptation.</p><h3>The New Service Builder: devctl</h3><p>The new service builder is a CLI tool called devctl. It reads the <strong>Service Definition</strong> (covered in Part 2) and generates a complete, production-ready service repository with every platform initiative pre-integrated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1-L2O7vJpXIz5daZO0mTZA.png" /></figure><p>The output is a repo that compiles, passes CI, and is deployable. Not a skeleton that needs days of plumbing.</p><p>devctl supports all BUs enabled by CTF, with per-BU default extension flags. Extensions like tracing, Sentry integration, schema migration, linting, dependency injection, and local development tooling (MirrorD) are toggled on or off based on each BU’s conventions.</p><h3>The Framework: Orion v2</h3><p>Under the hood, every generated service uses <strong>Orion v2</strong>, our rebuilt backend framework for gRPC microservices. The framework is a constellation of modular Go libraries, each with a single responsibility:</p><pre>orion-core             Lightweight gRPC server,signal handling,graceful shutdown<br>healthcheck/v2         Native gRPC health checks (K8s + Istio compatible)<br>go-grpc-interceptors  Core interceptors: logging, tracing, metrics<br>go-grpc-prometheus      Prometheus metrics integration<br>go-hystrix-prometheus   Circuit breaker metrics<br>go-logging              Structured logging interface (JSON, context-aware)<br>go-notifier             Error notification (Sentry integration)<br>configloader            Config loading + Vault secret resolution</pre><p>A service’s main.go wires these together in a few lines:</p><pre>server := orion.GetServer(cfg.Orion.GrpcPort,<br>    orion.WithUnaryInterceptors(<br>        go_grpc_interceptors.CoreUnaryServerInterceptors()...,<br>    ),<br>    orion.WithStreamInterceptors(<br>        go_grpc_interceptors.CoreStreamServerInterceptors()...,<br>    ),<br>)</pre><p>Every library is independently versioned and importable. Non-Orion services can adopt just healthcheck/v2 or just go-logging without pulling in the full framework.</p><h3>Key improvements over Orion v1</h3><p><strong>gRPC-native health checks.</strong> In v1, health checks ran on a separate HTTP port. Orion v2 uses native gRPC health checks on the same port as the service itself, requiring Kubernetes 1.24+ and Istio 1.14+, which we upgraded across all BUs. For worker pods (Kafka consumers, scheduled jobs), engineers implement a custom Check() RPC. We chose gRPC probes over exec probes because exec probes spin up a new process per call and can cause CPU spikes under load.</p><p><strong>Static configuration.</strong> Orion v1 had hot-reload logic that added complexity. Since Config Manager now handles configuration as versioned deployments, the framework no longer needs runtime reload.</p><p><strong>First-class worker support.</strong> Both scheduled workers and Kafka consumer workers are framework-managed components with the same health check, logging, and metrics integration as the main app.</p><h3>Code Architecture: Four Layers</h3><p>The generated service follows a four-layer architecture:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wzK56v91yLhHW-kYSoGK0w.png" /></figure><p>This separation ensures that business logic in the manager layer is testable without database dependencies, and the endpoint layer can compose multiple managers without them becoming entangled.</p><h3>Beyond Scaffolding: devctl service sync</h3><p>The builder isn’t just for day-one scaffolding. As a service evolves, devctl service sync detects changes and generates the corresponding code:</p><p><strong>Proto changes.</strong> New RPCs generate stub implementations in the endpoint layer.</p><p><strong>Config template changes.</strong> Updates regenerate the Config struct in config/types.go.</p><p><strong>Dependency changes.</strong> New service dependencies generate gRPC client initialization packages in external/.</p><p><strong>New components.</strong> Adding a worker scaffolds a new cmd/ entrypoint and component/ implementation.</p><p>The sync command never overwrites existing code. It only generates code for symbols that don’t exist yet.</p><h3>Tying It All Together</h3><p>Here’s the full lifecycle from zero to production for a new group-wide service:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DK4iD_ZmMoYKGUtIB1tFYw.png" /></figure><p>One codebase. One build. One deployment pipeline. Three (or more) business units.</p><h3>Conclusion</h3><p>The Group Infrastructure Platform delivery was about making the <strong>right way the easy way</strong>. When devctl service create — generates a repo that already has structured logging, gRPC health checks, config management, CI/CD workflows, and a clean four-layer architecture, engineers don’t have to make individual decisions about each of these concerns. The platform has already codified those decisions.</p><p>For Carousell Group, this means a service built by the Cho Tot team in Ho Chi Minh City works the same way as one built by the Mudah team in Kuala Lumpur or the Carousell team in Singapore. Engineers across the group can contribute to each other’s services, debug using the same tools and deploy with the same confidence.</p><h3>What’s Next: Agentic Engineering on Foundational Platforms and Solutions</h3><p>All these established the scaffolding foundation. The next evolution takes this much further: AI agents that don’t just create a service, but <strong>inflate it with business logic</strong> using domain-specific context.</p><p>We’re building an agentic engineering platform that automates the SDLC pipeline. The key insight: the standardised service structure and framework conventions that devctl produces are exactly what makes AI-assisted development tractable. When every service follows the same four-layer architecture, uses the same framework libraries, and stores configuration the same way, an AI agent can reason about code changes with high confidence.</p><p>MCP (Model Context Protocol) servers expose service catalog, API catalog, service knowledge and many more as queryable tools. Agents use these to look up service definitions, trace call paths, and verify RPC contracts, all without hardcoding assumptions about our architecture.</p><blockquote>Stay tuned for dedicated posts on our approach on Agentic Engineering</blockquote><p><em>This is Part 6 (final) of the Group Infrastructure Platform series on the Carousell Insider blog.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=98b46db2db4c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/carousell-insider/framework-and-service-builder-98b46db2db4c">Framework and Service Builder: From Zero to Production-Ready in One Command</a> was originally published in <a href="https://medium.com/carousell-insider">Carousell Insider</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unified Service Deployment Across Carousell Group]]></title>
            <link>https://medium.com/carousell-insider/unified-service-deployment-across-carousell-group-cc5f7fd9103f?source=rss-a8904b3da070------2</link>
            <guid isPermaLink="false">https://medium.com/p/cc5f7fd9103f</guid>
            <category><![CDATA[github-actions]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <dc:creator><![CDATA[Rajath Ramesh]]></dc:creator>
            <pubDate>Fri, 26 Jun 2026 05:05:09 GMT</pubDate>
            <atom:updated>2026-06-30T02:34:19.884Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h4RzuzO8PVCIdvNOli4lSw.png" /></figure><p><em>How we standardised CI/CD for three business units using GitHub Actions, self-hosted runners, and a GitOps-inspired deployment model.</em></p><p>Co-Authored with : <a href="https://www.linkedin.com/in/edward-samuel-pasaribu/">Edward</a> and <a href="https://www.linkedin.com/in/monali-reddy-7888a0b0/">Monali</a></p><p>Each of Carousell Group’s business units had its own deployment story. CRS relied on Jenkins with custom scripts. Cho Tot ran a mix of GoCD and Jenkins. Mudah had yet another pipeline. Deploying the same service across BUs meant maintaining three separate deployment configurations, three sets of credentials, and three mental models.</p><p>This post covers how we built a unified deployment solution as part of the Group Infrastructure Platform’s delivery.</p><h3>Design Principles</h3><p>We aligned on three principles before writing a single workflow file:</p><p><strong>Separation of CI and CD.</strong> Build and test (CI) happens in the service repo. Deployment (CD) happens in a dedicated central repo per BU. This keeps deployment credentials isolated and prevents service repos from accumulating infrastructure complexity.</p><p><strong>GitOps-inspired.</strong> Deployment state lives as files in a Git repository. Changing what’s deployed means committing to a repo, giving us audit trails, diffs, and rollback via git revert.</p><p><strong>Common workflows, BU-specific targets.</strong> The pipeline logic is shared across the group; only the infrastructure targets (clusters, registries, namespaces) differ per BU.</p><h3>The Two Deployment Flows</h3><p>We standardised on two flows: non-prod and prod.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rqL9IXRsxK8o0KaDicEENw.png" /></figure><p>The non-prod flow is deliberately simple: push to a branch, CI runs, image builds, deployment happens. The prod flow adds pre-prod validation, canary deployment, and human approval gates before full rollout.</p><h3>Infrastructure: Isolated Self-Hosted Runners</h3><p>We use <strong>GitHub Actions</strong> with <strong>self-hosted runners</strong> managed by the Actions Runner Controller (ARC) on Kubernetes. A critical security decision shaped the architecture: CI and CD runners are completely separate groups running in isolated networks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RDnxtlKUOEwnnU4vRtvFAA.png" /></figure><p>Each BU’s CI runners live in a dedicated GCP project with their own VPC network. This isolation matters because runners have elevated GitHub permissions and could be exploited via public repository forks if not properly contained.</p><p>CD runners live alongside the central infrastructure (Config Manager, Devportal) in each BU’s infra project. They have admin access to Kubernetes clusters for deployments but cannot build images or access source code directly.</p><p>Authentication uses <strong>GCP Workload Identity</strong> throughout. The runner’s Kubernetes service account maps directly to a Google service account, eliminating JSON key files entirely.</p><p>Runner autoscaling works on two axes: <strong>time-based</strong> (higher minimum replicas during working hours) and <strong>workload-based</strong> (scaling up when workers are occupied). We start with spot instances to keep costs low, accepting that occasional CI preemptions are tolerable.</p><h4>CI: Standard Checks Per Service</h4><p>Every service repo has a ci.yml that imports shared workflows from a central repository:</p><pre>ci.yml (runs on PR and merge)<br>│<br>├── Unit Tests<br>│ └── Go tests with optional datastore spin-up via Docker<br>│<br>├── Sonar Scan<br>│ └── Static code quality and security analysis<br>│<br>├── Config Manager Integration<br>│ └── Validate and sync config template<br>│<br>├── Protobuf Gen Version Check<br>│ └── Ensure only released proto versions are imported<br>│<br>├── PII Keyword Check<br>│ └── Flag PRs containing PII; require senior/security approval<br>│<br>└── Slack Notification</pre><p>Shared workflows live in a single cicd-workflows repo. A fix to any CI step propagates to all services without per-repo PRs. This is what makes it sustainable at scale: we maintain one set of workflows, not hundreds.</p><h4>CD: Per-BU Repositories, Shared Logic</h4><p>Each BU has its own CD repository that acts as the source of truth for what’s deployed:</p><pre>cs-cd/<br>├── .github/workflows/<br>│ ├── api - deploy-service.yml # Entrypoint (triggered by Devportal)<br>│ ├── common-deployment.yml # Shared deployment logic<br>│ └── services - demo.yml # Per-service workflow<br>├── clusters/<br>│ └── main-cluster-group/<br>│ ├── main-cluster-legacy/<br>│ │ └── cluster.yaml<br>│ └── main-cluster-istio/<br>│ └── cluster.yaml<br>└── services/<br>└── demo/<br>├── demo/<br>│ └── values.yml # App component state<br>├── demo-kafka-consumer/<br>│ └── values.yml # Worker component state<br>└── values.yml # Service-level values</pre><p>Each branch represents a base environment. Per-service workflows listen for file changes in services/&lt;name&gt;/. When the pipeline updates values.yml with a new image tag, the workflow triggers automatically.</p><p>This structure supports multi-cluster deployments through the clusters/ directory. A cluster group can contain multiple clusters with identical deployments, useful during migrations or for zonal redundancy.</p><h3>Common Helm Chart</h3><p>Rather than letting each BU maintain its own Helm charts, we built a <strong>common chart for all group-standard services</strong>. The chart deploys one component per release (one deployment = one component) and supports:</p><ul><li><strong>Workload types:</strong> Deployment, CronJob, and Job</li><li><strong>Service mesh options:</strong> plain Kubernetes Service, Traffic Director, or Istio sidecar</li><li><strong>Scheduling:</strong> Spot nodepool, GPU-enabled nodepool, or custom tainted nodepools</li><li><strong>Autoscaling:</strong> Standard HPA, KEDA ScaledObject, or Prometheus-based custom scaling</li><li><strong>Graceful shutdown:</strong> A first-class preStopSleep option that gives Kubernetes time to update endpoints asynchronously before SIGTERM</li><li><strong>Pod Disruption Budgets</strong> for safe node drains</li></ul><p>Legacy BU-specific charts remain for services that haven’t migrated. But every new group-standard service uses the common chart from day one.</p><h3>The Rollout Process</h3><p>Each deployment executes through <strong>Caroforge</strong>, our internal CLI that orchestrates Helm and kubectl:</p><pre>1. Initialise<br>   └── Fetch service metadata from service-definition repo<br><br>2. Render<br>   └── caroforge systems render &lt;system&gt;<br>       Helm template → commit rendered YAML to a<br>       separate repo for history and debugging<br><br>3. Apply<br>   └── caroforge systems deploy &lt;system&gt;<br>       Wraps helm upgrade --install<br><br>4. Wait<br>   └── caroforge systems rollout-status &lt;system&gt;<br>       Wraps kubectl rollout status<br><br>5. Notify<br>   └── Slack message + Google Sheets deployment log</pre><p>The rendered YAML repository is for tracking only. It gives us a Git-browsable history of every Kubernetes manifest ever applied, invaluable for debugging “what changed?” questions.</p><p>For production, additional steps include pre-prod deployment, canary deployment, and approval gates. Each BU composes its own prod pipeline from a shared library of workflow actions, since infrastructure topology varies (some BUs have pre-prod, some don’t).</p><h3>Config as Deployment</h3><p>Config updates follow the same pipeline as code changes. The CD workflow creates a new ConfigMap named &lt;component&gt;-&lt;content-hash&gt;. Old ConfigMaps are preserved (via Helm’s resource-policy annotation) and cleaned up asynchronously. This means a config rollback is just redeploying the previous ConfigMap, with the same audit trail as any other deployment.</p><h3>Deployment Triggers and Devportal Integration</h3><p>Engineers interact with deployments through <strong>Devportal</strong> (built on Backstage), which offers two trigger modes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MbAinRXBh_uf0Il0MEjveQ.png" /></figure><p><strong>Build from source</strong> lets you specify a branch or commit. The pipeline triggers the deploy.yml in the service repo to build a new image, then proceeds with deployment.</p><p><strong>Deploy existing image</strong> lets you pick a previously built image tag, useful for rollbacks or promoting a staging build to production.</p><p>Two advanced options handle edge cases: <strong>Force deployment</strong> recreates all pods even when the image hasn’t changed (equivalent to kubectl rollout restart), and <strong>Emergency deployment</strong> sets 100% max surge for faster rollout during incidents.</p><h3>Approval via Devportal</h3><p>We built a custom GitHub Actions plugin that pauses a workflow at promotion checkpoints and sends a Slack notification with a deep link to Devportal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EcbLTLaVxM-39FPqZ6s1lQ.png" /></figure><p>Three approval modes cover different risk profiles: one service owner is sufficient for most deployments, anyone authenticated works for low-risk changes, and unanimous approval from a predefined list covers critical services. SREs retain a <strong>Force Approve</strong> for incident response.</p><h3>Image Building</h3><p>Docker images are built with <strong>Docker Buildx</strong> in the service repo’s deploy.yml. Since runners are ephemeral (no local cache), we cache intermediate build layers in Google Artifact Registry keyed by branch. Both the main branch cache and the current branch cache are loaded, so feature branches benefit from mainline layer reuse.</p><p>Images follow the <strong>Container Definition</strong> standard: a code-image for development (with source and tools) and a binary-only image for production (minimal attack surface).</p><p>Image versioning uses the format &lt;registry&gt;/&lt;system&gt;/&lt;env&gt;/r&lt;counter&gt;. This structure supports monorepos, is human-readable, and makes cleanup straightforward since images are grouped by environment folder.</p><h3>What Came Next: Argo Rollouts</h3><p>After initial version, we added <strong>Argo Rollouts</strong> for progressive delivery. The integration touches every layer of the stack:</p><p><strong>Caroforge</strong> gained new commands under caroforge systems argo-rollout: abort, promote, full-promote, retry, status, and get-dashboard-url.</p><p><strong>Helm chart</strong> added three new templates: a Rollout resource with canary strategy and automated analysis, an AnalysisTemplate for metrics-based evaluation, and an Istio east-west gateway VirtualService for cross-cluster traffic routing.</p><p><strong>CI/CD workflows</strong> added rollout-aware deployment steps that wait for Argo Rollout status at each stage, with Slack notifications for paused, promoted, aborted, and degraded states.</p><p>The onboarding tool (caroforge cs-migration onboard-argo) automatically generates rollout configuration by querying Prometheus for actual traffic patterns: it detects exposed ports, measures current error rates to set success thresholds, and reads current replica counts to avoid downtime during migration.</p><h3>Tying It Together</h3><p>The deployment platform isn’t just a CI/CD pipeline. It’s the integration point where every other platform component converges: Service Definition drives what gets deployed, Config Manager provides environment-specific configuration, Vault supplies secrets at runtime, and the common Helm chart ensures consistent Kubernetes manifests. The result is a deployment experience where an engineer in Ho Chi Minh City and an engineer in Singapore use the same tools, the same workflows, and the same approval gates to ship to production.</p><p>In the final post of this series, we’ll cover the Framework and Service Builder that ties all platform components into a single devctl service create command.</p><p><em>← Previous:</em><a href="https://medium.com/carousell-insider/secret-and-configuration-management-auditable-api-first-and-secure-at-scale-def805774be2"><em>Part 4— Config &amp; Secret Mgmt</em></a><em> → Next: </em><a href="https://medium.com/carousell-insider/framework-and-service-builder-98b46db2db4c"><em>Part 6 — Framework &amp; Builder</em></a></p><p><em>This is Part 5 of the Group Infrastructure Platform series on the Carousell Insider blog.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cc5f7fd9103f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/carousell-insider/unified-service-deployment-across-carousell-group-cc5f7fd9103f">Unified Service Deployment Across Carousell Group</a> was originally published in <a href="https://medium.com/carousell-insider">Carousell Insider</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Secret and Configuration Management: Auditable, API-First and Secure at Scale]]></title>
            <link>https://medium.com/carousell-insider/secret-and-configuration-management-auditable-api-first-and-secure-at-scale-def805774be2?source=rss-a8904b3da070------2</link>
            <guid isPermaLink="false">https://medium.com/p/def805774be2</guid>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[hashicorp-vault]]></category>
            <category><![CDATA[configuration-management]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[self-serve-platform]]></category>
            <dc:creator><![CDATA[Rajath Ramesh]]></dc:creator>
            <pubDate>Thu, 25 Jun 2026 03:41:54 GMT</pubDate>
            <atom:updated>2026-06-30T02:33:28.861Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WtAu-Ln3RpSMWSgMdBSiOg.png" /></figure><p><em>How we replaced Consul with HashiCorp Vault for secrets and built a centralised Config Manager to serve every Carousell Group business unit.</em></p><p>Co-Authored with: <a href="https://www.linkedin.com/in/dushyant-raghav/">Dushyant</a> and <a href="https://www.linkedin.com/in/praveen-sanap-48208951/">Praveen</a></p><p>When you run one marketplace, managing secrets and configs is manageable. When you run three, each with its own tools, conventions, and environments, it becomes a liability. A service that Consul could no longer hold together: no authorisation control for key visibility, no audit trail for who accessed or modified a secret, and no support for rotation or versioning.</p><p>This post covers how we unified both concerns as part of the Group Infrastructure Platform’s delivery.</p><h3>Part 1: Secret Management</h3><h4>What Were Our Challenges</h4><p>Our previous setup relied on Consul as the data store for both secrets and configuration variables. Each service pod ran a Consul agent and used Consul templating to retrieve values from the cluster.</p><p>The gaps were non-trivial:</p><ul><li>As the platform aged, version drift across clusters grew and upgrades carried non-trivial coordination overhead</li><li>Granular restrictions were manual and case by case basis</li><li>Credential rotation was a manual process with no built-in versioning to roll back safely.</li><li>Credential rotation was a manual, error-prone process with no built-in versioning to roll back safely.</li></ul><p>For a group operating across multiple BUs with separate compliance requirements, this was untenable.</p><h3>Why Vault</h3><p>We evaluated GCP KMS, GCP Secret Manager, and HashiCorp Vault against six requirements: secure storage, access controls, lifecycle management, auditing, versioning, and high availability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*THYoB2WHD7BViAgB39sZjw.png" /></figure><p>Vault won on fine-grained access control, secret rotation, dynamic secrets for future use cases, and vendor agnosticism. As a multi-cloud, multi-BU group, not being locked to GCP mattered.</p><h3>How Secrets Flow</h3><p>The secret handling workflow integrates Vault with Config Manager and the CI/CD pipeline. The key principle: <strong>secrets never touch disk on application pods</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4746YIZ_uygzqqBBpqWgOw.png" /></figure><p>The Vault library embedded in the app authenticates using the pod’s Kubernetes service account, fetches secrets at runtime, and holds them only in memory.</p><h3>Two Authentication Methods</h3><p><strong>Engineers (user auth):</strong> GitHub auth method. Vault maps GitHub team membership to Vault policies, so access control mirrors our existing org structure. An engineer logs in with their GitHub personal access token; Vault verifies it against GitHub’s API, retrieves team membership, and assigns the corresponding policies.</p><p><strong>Services (machine auth):</strong> Kubernetes auth method. The app’s Vault library presents the pod’s service account token. Vault validates it against the cluster’s token endpoint and returns a scoped Vault token.</p><pre>Role naming: role-&lt;env&gt;-&lt;servicename&gt;<br>Policy naming: policy-&lt;env&gt;-&lt;servicename&gt;</pre><p>SREs pre-define roles and policies per service using a Terraform-based script that reads the list of services from the CD repo and generates the role/policy definitions. This ensures least-privilege access by default and infrastructure-as-code for all Vault configuration.</p><h3>Secret Path Convention</h3><p>We evaluated two approaches. Approach 1 grouped all secrets under a single versioned path per service. Approach 2 gave each secret its own path with independent versioning.</p><p>We chose Approach 2 for granular control:</p><pre># Datastores<br>&lt;env&gt;/&lt;servicename&gt;/postgres/&lt;cluster&gt;/default/password<br>&lt;env&gt;/&lt;servicename&gt;/postgres/&lt;cluster&gt;/default/username<br><br># service accounts<br>&lt;env&gt;/&lt;servicename&gt;/gcp/default/service-account</pre><p>Rolling back one database password does not force a version change on unrelated secrets. In the Config Manager template, secrets are referenced with a !SECRET tag:</p><pre>demo:<br>  demo-db:<br>    leader:<br>      password: !SECRET &quot;prod/demo/demo-database/leader/password@v3&quot;<br>      username: !SECRET &quot;prod/demo/demo-database/leader/user@v3&quot;</pre><h3>Cluster Setup</h3><p>The Vault cluster runs three nodes on Vault with integrated storage, TLS encryption between nodes, and Google Cloud KMS for auto-unseal. This provides high availability while keeping the unsealing process secure and automated.</p><h3>Part 2: Configuration Management</h3><h4>What Were the Hurdles</h4><p>Configuration was scattered differently across BUs:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tRyvjv_y7oD1w1FiHtAS7Q.png" /></figure><p>Deploying a service across BUs meant adapting to each BU’s config approach, exactly the kind of environment-specific work the platform was supposed to eliminate.</p><h4>Config Manager: The Solution</h4><p>We built Config Manager, a centralised platform that abstracts environment-specific values out of code. A service declares a config template; Config Manager resolves values per environment, integrates with Vault for secrets, and delivers the final config to the deployment pipeline.</p><p>The platform is built around four principles: <strong>API-first</strong> (every operation has an API), <strong>auditable</strong> (every change is tracked), <strong>versioned</strong> (config updates are immutable deployments), and <strong>self-serve</strong> (engineers manage their own configs via UI or API).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KVsTmUsBcNXLJ9MWauQlWw.png" /></figure><h4>Template System</h4><p>The template is a YAML file where each leaf node has a typed annotation. Basic types like !STRING, !INT, !BOOL, and !FLOAT cover simple values. Custom types like !SECRET, !HOSTPORT, and !DURATION handle special formats. Composite types like !POSTGRES, !REDIS, !KAFKA_CONSUMER, and !ORION expand into a standard set of fields with sensible defaults, so engineers do not need to redeclare connection parameters for common datastores.</p><p>This means a Postgres connection block in your template is just:</p><pre>db:<br>leader: !POSTGRES<br>maxIdleConn: !INT 5</pre><p>Config Manager expands !POSTGRES to include hostPort, user, password, database, and all standard fields, pre-populated with defaults and overridable per environment.</p><h4>Code Generation</h4><p>devctl generates typed config structs from the template, so there is no mismatch between what Config Manager delivers and what the service code expects:</p><pre># Generate Go struct matching the template<br>devctl config codegen - config-template-file=config.yml - language=go</pre><p>This produces a Config struct that maps 1:1 to the template. The config loader library (available for Go, Python, Ruby, TypeScript/Node.js) reads the mounted config file at startup, resolves !SECRET paths via the Vault library, and returns a strongly-typed config object.</p><h4>Config as Deployment</h4><p>A key design decision: config changes are rolled out as deployments. When an engineer updates a value via the Config Manager UI or API, a webhook triggers the CD pipeline. The pipeline skips the build step and only updates the Kubernetes ConfigMap, but it goes through the same approval gates, rollback capabilities, and audit trail as a code deployment.</p><p>This ensures config updates are:</p><pre>Immutable     Every version is a snapshot<br>Auditable     Git-backed diffs + deployment logs<br>Rollbackable  Revert to any previous version<br>Consistent    Same pipeline for code and config</pre><h4>Value Management in Devportal</h4><p>Engineers manage config values through a Backstage plugin in Devportal. For each service and environment, the UI shows every config key, its current value, type, and whether it references a secret. Engineers can update values, see the diff before applying, and trigger a config deployment, all without touching YAML files or Kubernetes directly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i6O5GEBhi9UKjGEgwrWuYg.png" /></figure><p>This is where the self-serve story comes together: an engineer can go from “I need to change a database connection pool size in production” to “change deployed” without filing a ticket or involving another team.</p><h3>Tying It Together: The Self-Serve Loop</h3><p>The full lifecycle for managing secrets and config across BUs:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r0XC-N1GgvoSVoQ-JyyqYA.png" /></figure><p>No secrets on disk. No environment-specific code. No manual provisioning. Every access audited, every change versioned, every update deployed through the same pipeline as code.</p><h3>What’s Next</h3><p>These delivered the core platform: Vault integration, template management, typed KV store, code generation, and CI/CD integration. Future milestones will add diff visualisation in the UI, automated secret rotation triggers, dynamic secret engines for short-lived database credentials, and client-side remote config for mobile apps.</p><p>In the next post, we will cover how the unified service deployment pipeline ties all these components together.</p><p><em>← Previous: </em><a href="https://medium.com/carousell-insider/api-definition-and-protobuffer-management-1e28b02e9b18"><em>Part 3— API Definition</em></a><em> → Next: </em><a href="https://medium.com/carousell-insider/unified-service-deployment-across-carousell-group-cc5f7fd9103f"><em>Part 5— Service Deployment</em></a></p><p><em>This is Part 4 of the Group Infrastructure Platform series on the Carousell Insider blog.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=def805774be2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/carousell-insider/secret-and-configuration-management-auditable-api-first-and-secure-at-scale-def805774be2">Secret and Configuration Management: Auditable, API-First and Secure at Scale</a> was originally published in <a href="https://medium.com/carousell-insider">Carousell Insider</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[API Definition and Protobuffer Management at Carousell Group]]></title>
            <link>https://medium.com/carousell-insider/api-definition-and-protobuffer-management-1e28b02e9b18?source=rss-a8904b3da070------2</link>
            <guid isPermaLink="false">https://medium.com/p/1e28b02e9b18</guid>
            <category><![CDATA[protobuf]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[api-design]]></category>
            <category><![CDATA[grpc]]></category>
            <category><![CDATA[engineering]]></category>
            <dc:creator><![CDATA[Rajath Ramesh]]></dc:creator>
            <pubDate>Thu, 25 Jun 2026 03:40:37 GMT</pubDate>
            <atom:updated>2026-06-25T03:42:36.508Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VsIjK-e57esLCAEyp6yKyA.png" /></figure><p><em>How we standardised API contracts, automated code generation, and built guardrails to keep 100+ microservices interoperable across business units.</em></p><p>Co-Authored with: <a href="https://www.linkedin.com/in/vipulsodha/">Vipul</a></p><p>In a microservices architecture, the API contract between services is everything. Get it wrong, and you pay with broken integrations, undocumented behaviours, and hours spent reverse-engineering what a field actually means. At Carousell Group, running three mature marketplaces with hundreds of services, we needed API contracts to be more than proto files scattered across random repos.</p><p>This post covers how we standardised API definition, protobuf management, and code generation as part of the Group Infrastructure Platform’s initial delivery.</p><h3>The Problem</h3><p>Before CTF, each business unit had evolved its own protobuf workflow independently:</p><p><strong>Carousell (CRS)</strong> stored proto files in a central repo, but code generation happened locally on each engineer’s machine using an in-house protogen tool. Generated code lived inside each service repo. There was no breaking change detection and no enforcement of a standard generation tool — different engineers could produce different outputs from the same proto. Worse, the central repo feature branch and the service’s master branch could easily drift out of sync.</p><p><strong>Cho Tot (CT)</strong> had a central repo with a CI pipeline using buf.build for generation and breaking change detection. Each service had its own Go module in the generated repo — a more mature setup.</p><p><strong>Mudah (MD)</strong> also used a central repo with buf.build, but all services shared a single Go module — meaning any proto change bumped the version for every service, complicating dependency management.</p><p>Three BUs, three approaches. This created real problems: no consistent way to discover what APIs a service exposed, no uniform breaking change detection, and no mechanism to share contracts across BUs without tight coupling.</p><h3>The Solution</h3><p>We tackled this in three streams: <strong>metadata and annotations</strong>, <strong>structure</strong>, and <strong>code generation</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YZziSCTTC4_nhQAEkgUbbQ.png" /></figure><h3>Stream 1: Metadata and Annotations</h3><p>Raw proto files tell you the shape of a request and response. But they don’t tell you who owns the API, whether it requires authentication, if it handles PII, or whether it’s safe to retry. We added three layers of metadata.</p><h4>Documentation and Ownership</h4><p>Every RPC carries structured annotations for discoverability:</p><pre>/**<br> * @summary: Get user information<br> * @owner: accountsteam<br> * @tags: user<br> */<br>rpc GetUser (GetUserRequest) returns (GetUserResponse) {}</pre><p>rpc GetUser (GetUserRequest) returns (GetUserResponse) {}</p><p>CI validates that team names are real GitHub teams. This metadata is scraped on merge and surfaces in Devportal — our internal service catalog — making API discovery searchable without needing to grep repos.</p><h4>API Method Annotations</h4><p>We introduced protobuf-native method annotations — not comments — to capture operational metadata that machines can read:</p><pre>rpc HttpEcho(EchoRequest) returns (EchoResponse) {<br>  option (google.api.http) = {<br>    put: &quot;/v1/echo/{name}&quot;<br>    body: &quot;EchoResponse&quot;<br>  };<br>  option (common_annotations.api_method_annotation) = {<br>    auth_requirement: AUTH_REQUIREMENT_REQUIRED<br>    required_headers: [&quot;x-api-key&quot;, &quot;x-user-id&quot;]<br>    retriable: true<br>    protocol: PROTOCOL_HTTP<br>    wire_format: WIRE_FORMAT_JSON<br>    operation_type: OPERATION_TYPE_READ<br>  };<br>};</pre><p>Why protobuf annotations over comments? Comments require custom parsers and are hard to enforce consistently. Proto annotations are machine-readable, enforceable via CI, and propagated through the entire toolchain. Gateway code generation, retry policies, DR routing, and Devportal all consume these annotations directly.</p><h4>PII Classification</h4><p>We tag PII at the field level so that any API exposing sensitive data is automatically discoverable:</p><pre>message LoggedInUser {<br>  string first_name = 1<br>    [(common_annotations.pii_classification) = PII_NAME];<br>  string email = 3<br>    [(common_annotations.pii_classification) = PII_EMAIL];<br>  google.protobuf.Timestamp date_joined = 4;<br>}</pre><p>The CI pipeline uses keyword-based rules (matching field names against patterns like .*email.*, .*phone.*, ^nric.*) to detect potentially unmarked PII fields. If a field matches a PII pattern but lacks an annotation, the pipeline blocks the merge — the engineer must explicitly mark it as PII or NOT_PII. This prevents accidental PII exposure from slipping through code review.</p><h4>Validation Rules</h4><p>We adopted <a href="https://github.com/bufbuild/protoc-gen-validate">protoc-gen-validate</a> for declarative input validation:</p><pre>message User {<br>  string name = 1 [(validate.rules).string.min_len = 1];<br>}</pre><p>Validation is enforced server-side via gRPC interceptors — every service using the generated server code gets input validation for free. The rules are deliberately kept to basic sanity checks (required fields, string length, enum bounds) — not business logic.</p><h3>Stream 2: Folder and Repository Structure</h3><h4>Folder Structure</h4><p>Proto files for each service are organised by <strong>purpose</strong>:</p><pre>service/<br>├── public/           # APIs called by downstream services<br>├── management/       # APIs for admin tools only<br>├── internalapis/     # APIs used only within the service<br>└── common/           # Shared messages and enums</pre><p>This isn’t just organisation — it has operational consequences. Management APIs get stricter authorisation. Internal APIs are never exposed via the API gateway. Public APIs receive the most review scrutiny. Future service-to-service authorisation can key off these boundaries.</p><h4>Repository Structure</h4><p>Instead of proto files scattered across 100+ service repos, we centralised into <strong>per-BU proto repositories</strong> with matching <strong>generated code repositories</strong>:</p><pre>Proto Source Repos         Generated Code Repos<br>───────────────────────────────────────────────<br>cs-proto            ──►      cs-proto-gen-go<br>ct-proto            ──►      ct-proto-gen-go<br>md-proto            ──►      md-proto-gen-go<br>ctf-proto           ──►      ctf-proto-gen-go</pre><p>Separating proto definitions from generated code is a deliberate design choice. It decouples the source of truth from any specific language output — making it straightforward to add *-proto-gen-java, *-proto-gen-swift, or publish to npm/Maven registries in future milestones without restructuring.</p><p>Each service in the generated repo gets <strong>two Go modules</strong>:</p><ul><li><strong>server</strong>: imported by the owning service to implement RPCs (includes validation, framework and gRPC-gateway plugins)</li><li><strong>client</strong>: imported by calling services (lightweight, no server dependencies)</li></ul><p>Callers never depend on the server’s implementation details.</p><h3>Stream 3: Code Generation Pipeline</h3><p>This is where everything comes together. The end-to-end flow from API definition to importable library is fully automated:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G9KoqD_nockJB0OETw9WmA.png" /></figure><h4>Key design decisions in this pipeline:</h4><p><strong>Feature branch parallelism.</strong> When an engineer opens a PR in cs-proto, the CI pipeline generates code and pushes it to a parallel feature branch in cs-proto-gen-go. Engineers can go get …@branch_name to start development immediately — no waiting for the proto PR to merge. This was a major pain point in the old Carousell workflow where developers were blocked until proto changes landed on master.</p><p><strong>Merge safety.</strong> A CI check on every service repo verifies that Go module versions point to proper release tags, not feature branch commits. You can’t accidentally ship code depending on an unmerged proto change.</p><p><strong>Breaking change detection.</strong> Using buf.build’s built-in detector, the pipeline catches field type changes, removed or renamed fields/enums/messages, and removed RPCs. These are blocked at the PR level.</p><p><strong>Whitelisted imports.</strong> Proto files cannot import other services’ protos — preventing hidden inter-service coupling. Only common libraries are allowed:</p><pre>ALLOWED_IMPORT_PATHS=(<br>&quot;protoc-gen-swagger/&quot;<br>&quot;proto/common/&quot;<br>&quot;google/&quot;<br>&quot;validate/&quot;<br>&quot;messaging/&quot;<br>)</pre><p><strong>Lint and naming enforcement.</strong> buf.build lint checks enforce coding standards, and CI validates <em>go_package</em> naming follows the convention <em>github.com/{org}/{bu}-proto-gen-go/{service};{service}</em>.</p><h4>The Developer Workflow</h4><p>From an engineer’s perspective, the day-to-day is simple:</p><ol><li><strong>Define or update</strong> proto files in the BU’s proto repo on a feature branch</li><li><strong>Open a PR</strong> — lint, breaking change detection, PII validation, and import checks run automatically</li><li><strong>Start developing</strong> — import the generated code from the parallel feature branch while the PR is in review</li><li><strong>Merge the proto PR</strong> — pipeline generates final code and tags a release</li><li><strong>Update go.mod</strong> in your service to point to the tagged version</li><li><strong>Ship</strong> — the service CI validates you’re not referencing feature branch commits</li></ol><p>No manual code generation. No copying proto files. No version drift between proto definitions and generated code. No wondering which protoc version a colleague used.</p><h3>What’s Next</h3><p>Initial version delivered Go language support across all BUs with a unified pipeline. Future milestones will extend generation to <strong>Java, Swift, and other languages</strong> — the separated proto-source and generated-code repo structure was designed exactly for this. Automated API documentation publishing to Devportal, HTTP URL and method standardisation enforcement, and integration with group-wide data schema standards for event-driven architectures are also on the roadmap.</p><p>In the next post, we’ll cover how we unified secret management with HashiCorp Vault and built a new configuration management platform.</p><p><em>← Previous: </em><a href="https://medium.com/carousell-insider/service-definition-6125e61e2326"><em>Part 2 — Service Definition</em></a><em> → Next: </em><a href="https://medium.com/carousell-insider/secret-and-configuration-management-auditable-api-first-and-secure-at-scale-def805774be2"><em>Part 4 — Secret &amp; Config Mgmt</em></a></p><p><em>This is Part 3 of the Group Infrastructure Platform series on the Carousell Insider blog.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1e28b02e9b18" width="1" height="1" alt=""><hr><p><a href="https://medium.com/carousell-insider/api-definition-and-protobuffer-management-1e28b02e9b18">API Definition and Protobuffer Management at Carousell Group</a> was originally published in <a href="https://medium.com/carousell-insider">Carousell Insider</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Service Definition: The Cornerstone of Carousell’s Infrastructure Platform]]></title>
            <link>https://medium.com/carousell-insider/service-definition-6125e61e2326?source=rss-a8904b3da070------2</link>
            <guid isPermaLink="false">https://medium.com/p/6125e61e2326</guid>
            <category><![CDATA[developer-experience]]></category>
            <category><![CDATA[platform-engineering]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[carousell]]></category>
            <category><![CDATA[engineering]]></category>
            <dc:creator><![CDATA[Rajath Ramesh]]></dc:creator>
            <pubDate>Wed, 24 Jun 2026 03:24:25 GMT</pubDate>
            <atom:updated>2026-06-30T02:30:49.553Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KvQQh8YjZ4KRQQ5CebTnLQ.png" /></figure><p><em>How a single YAML file per service became the source of truth for automation, deployment, and self-serve provisioning across our group.</em></p><p>Co-Authored with: <a href="https://www.linkedin.com/in/praveen-sanap-48208951/">Praveen</a></p><p>In the <a href="https://medium.com/@rajathramesh/common-tech-foundation-carousell-group-ac1b11aefedf">previous post</a>, we introduced the Group Infrastructure Platform and why Carousell Group needed a unified approach to build, deploy, and operate services across business units. This post dives into the foundational piece that makes everything else possible: <strong>Service Definition</strong>.</p><h3>The Problem</h3><p>At Carousell, knowledge about a service lived in multiple places. Who owns user-svc? Check GitHub. What datastores does it use? Grep the config files. Which BUs is it deployed to? Ask the SRE on-call. Managing this data in each BU was different, at times incomplete with missing pieces.</p><p>This scattered metadata created three concrete problems:</p><ol><li><strong>Automation was hard.</strong> Every tool — CI pipelines, deployment scripts, monitoring — had to independently discover service properties, often by parsing scripts or hardcoded values.</li><li><strong>Catalog maintenance was a constant tax.</strong> Keeping services’ list, its metadata accurate required manual effort which made it harder to keep things up to date.</li><li><strong>Cross-BU deployment was not possible.</strong> There was no machine-readable way to express “this service should be deployed in Carousell, Cho Tot, and Mudah with these properties.”</li></ol><h3>The Solution: A Declarative Service Definition</h3><p>We introduced a <strong>Service Definition</strong> — a YAML file per service that captures everything needed to provision, deploy, and operate that service. Think of it as the service’s birth certificate and operating manual in one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gw-89qYb8N3eOtz5v5tUBA.png" /></figure><p>Given a valid Service Definition, a functional service, with all its dependencies and infra components — can be provisioned automatically in any environment.</p><h3>What’s in a Service Definition?</h3><p>Here’s a complete example:</p><pre>name: demo-gateway<br>system: demo-gateway              # derived from name<br>scope:<br>  - cs                            # Carousell<br>  - md                            # Mudah<br>repo: github.com/carousell/demo-gateway<br>description: &gt;<br>  Service to demonstrate backend development<br>  at Carousell. Playground for onboarding bootcamp.<br>owner: backendplatform            # GitHub team slug<br>language: go<br>framework: orion-v2<br><br>api-definition-repo: https://github.com/carousell/shared-proto<br>api-definitions:<br>  - demo/public/demo.proto<br>  - demo/management/admin.proto<br><br>datastores:<br>  - name: demo-db<br>    type: postgresql<br>    version: &quot;12&quot;<br>    schema: migration/<br><br>components:<br>  - type: app<br>    name: demo-gateway<br>    commands:<br>      start: [&quot;start&quot;, &quot;demo-gateway&quot;]<br>  - type: worker<br>    name: demo-kafka-consumer<br>    commands:<br>      start: [&quot;start&quot;, &quot;demo-kafka-consumer&quot;]<br><br>dependencies:<br>  - user/user<br>  - cats/cats<br>externalDependencies:<br>  - protocol: http<br>    hosts:<br>      - api-xyz.sendbird.com</pre><p>A few fields worth highlighting:</p><p><strong>scope</strong> is the field that makes cross-BU deployment possible. It declares which business units this service targets, and every downstream system — CI/CD, Config Manager, infra provisioning — reads it to do the right thing.</p><p><strong>datastores</strong> are declared by name, not by connection string. The name-to-host mapping lives in the infrastructure layer. Config Manager uses this to prepare connection configs per environment, so engineers never hardcode connection strings.</p><p><strong>components</strong> let a service declare multiple deployable units — the main app plus workers (Kafka consumers, scheduled jobs) — all built from the same repo and image but started with different commands.</p><p><strong>dependencies</strong> make inter-service relationships explicit and machine-readable, enabling service-mesh and NAT-based traffic policies.</p><h3>Where Definitions Live</h3><p>All Service Definitions across the group live in a <strong>single central repository</strong>, grouped by BU scope:</p><pre>service-definition/<br>├── definitions/<br>│   ├── cs/             # Carousell services<br>│   ├── md/             # Mudah services<br>│   ├── ct/             # Cho Tot services<br>│   └── grp/            # Group-wide services<br>├── schema/             # Protobuf schema<br>└── tools/              # CLI validation tools</pre><p>We considered two placement approaches during the RFC process: definitions in each service repo vs. a central repo. We chose <strong>central</strong> because it gives a global view of every service in the group, makes cross-cutting queries trivial, and aligns with our vision of self-serve provisioning, where developers create and edit definitions without touching Git directly.</p><p>The trade-off is that infrastructure changes (like adding a new datastore) go through the central repo rather than the service repo. We accepted this because it means Config Manager and other downstream systems always have a consistent, validated source of truth.</p><h3>Validation at the Source</h3><p>Multiple systems depend on Service Definition, so correctness is non-negotiable. A CLI tool validates against the protobuf-backed schema:</p><pre>$ service-definition validate -f definitions/grp/demo.yaml<br>✓ Schema valid<br>✓ Name uniqueness: passed<br>✓ Owner team exists in GitHub<br>✓ API definition paths resolve</pre><p>This runs as a CI check on every PR. Invalid definitions never merge.</p><p>The schema itself is defined as a protobuf message, giving it a reliable evolution path with strong typing and backward compatibility guarantees.</p><h3>How Platform Components Use It</h3><p>The Service Definition is consumed by virtually every other component in the platform:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SyF2AscWaK7YhPOeyrneyA.png" /></figure><p>This is the key insight: <strong>every platform component reads from the same source</strong>, eliminating the divergence that happens when each tool independently discovers service properties.</p><h3>Design Decisions</h3><p>Three key decisions shaped the design, each documented through Architecture Decision Records (ADRs):</p><p><strong>Workers as child properties of a service, not separate definitions.</strong> We chose this to maintain parity — the same code deployed across all components eliminates a whole class of version incompatibility errors. The trade-off is slower deployments when only a worker changes, but correctness won over speed here.</p><p><strong>YAML format backed by protobuf schema.</strong> YAML is concise, human-readable, and supports complex data types. The protobuf schema provides reliable validation and a clear evolution path. Diffs in PRs are immediately understandable.</p><p><strong>Schema evolution via ADR.</strong> The schema has been amended a few times as use cases and dependencies grew: renaming, standardising to match group naming conventions and restructuring the folder layout to group by BU scope.</p><h3>What’s Next</h3><p>Currently, Service Definition captures the essentials: metadata, APIs, datastores, components, and dependencies. Future milestones will extend it to include infrastructure provisioning specs (resource requests, autoscaling policies), method-specific overrides and more.</p><p>The vision: <strong>describe your service once, and the platform does the rest.</strong></p><p>Next up, we cover how API contracts are defined, generated, and shared across BUs using our unified Protobuffer management pipeline.</p><p><em>← Previous: </em><a href="https://medium.com/carousell-insider/common-tech-foundation-carousell-group-ac1b11aefedf"><em>Part 1 — Common Tech Foundation</em></a> <em>→ Next: </em><a href="https://medium.com/carousell-insider/api-definition-and-protobuffer-management-1e28b02e9b18"><em>Part 3 — API Definition</em></a></p><p><em>This is Part 2 of the Group Infrastructure Platform series on the Carousell Insider blog.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6125e61e2326" width="1" height="1" alt=""><hr><p><a href="https://medium.com/carousell-insider/service-definition-6125e61e2326">Service Definition: The Cornerstone of Carousell’s Infrastructure Platform</a> was originally published in <a href="https://medium.com/carousell-insider">Carousell Insider</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Common Tech Foundation at Carousell Group: Building One Platform to Scale Lean and Effectively]]></title>
            <link>https://medium.com/carousell-insider/common-tech-foundation-carousell-group-ac1b11aefedf?source=rss-a8904b3da070------2</link>
            <guid isPermaLink="false">https://medium.com/p/ac1b11aefedf</guid>
            <category><![CDATA[infrastructure]]></category>
            <category><![CDATA[digital-transformation]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[platform-engineering]]></category>
            <category><![CDATA[microservices]]></category>
            <dc:creator><![CDATA[Rajath Ramesh]]></dc:creator>
            <pubDate>Wed, 24 Jun 2026 03:22:15 GMT</pubDate>
            <atom:updated>2026-06-26T07:35:07.220Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hITT44K0pxS5LdW4RnvuWw.png" /></figure><p><em>How we unified infrastructure across multiple business units to ship faster, spend smarter and unlock group-wide data intelligence.</em></p><p>Co-Authored with: <a href="https://www.linkedin.com/in/igor-volynskiy-74b0722/">Igor</a> and <a href="https://www.linkedin.com/in/kelvin-vuong-98416784/">Kelvin</a></p><p>Carousell Group operates multiple marketplace businesses across Southeast Asia: Carousell (CRS), Cho Tot (CT), Mudah (MD) and Laku6. Collectively, a few hundred engineers across Product, Engineering, Data, and IT work on these platforms. Each business unit (BU) evolved its own technology stack, deployment pipelines, and operational tooling independently.</p><p>This independence served us well during rapid growth. But as the group matured, a question became unavoidable:</p><p><strong>How do we invest in technology efficiently while not unduly slowing down individual business units?</strong></p><p>The answer was the <strong>Common Tech Foundation (CTF)</strong> and at its core, the <strong>Group Infrastructure Platform</strong>.</p><h3>The Three-Layer Model</h3><p>We structured Carousell Group’s technology investments into three layers:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uWq_qzQ-4v6ZoNUpCFx4ow.png" /></figure><p>Each marketplace platform is the go-to-market vehicle for its respective country. Deep category platforms (like Laku6 for device trade-ins) serve a unique set of users across marketplaces with largely similar use cases. The bottom layer, Common Enabling Tech Capabilities, is where the Group Infrastructure Platform lives.</p><h3>Why Build a Common Infrastructure Platform?</h3><p>Four motivations drove this initiative.</p><h4>Codifying Architecture Decisions</h4><p>Decisions and guardrails that live only in documents don’t scale. When three BUs each make their own choices about logging, deployment, configuration, and secrets management, the resulting divergence creates a tax on security, compliance and more importantly — every engineer who moves between codebases or debugs integrations.</p><p>We needed architecture decisions to be <strong>codified into platforms and tools</strong>, enforced by default.</p><h4>Self-Serve Platforms with Built-in Auditing and Compliance</h4><p>Product engineers shouldn’t need to file tickets and wait for platform teams to provision infrastructure. The goal was a PaaS model where engineers interact with the infrastructure via <strong>APIs and self-serve tooling</strong>, with audit trails, access controls, and compliance baked in from day one.</p><h4>Cost and Operational Efficiency</h4><p>Build once, use across all BUs. A unified infrastructure platform keeps the team lean, consolidates vendor contracts for better pricing, and enables effective cost optimisation initiatives at the group level. Before CTF, each BU negotiated its own cloud contracts, ran its own monitoring stacks, and maintained its own CI/CD pipelines. This came with an equivalent multiplier of operational overhead and loss of upside capability.</p><h4>Services Reusable Across BUs</h4><p>This was the most important driver. A service or application or an enabling platform built in one BU should be <strong>immediately deployable across all BUs</strong>, improving time to market. When the Product Authority team builds a product catalog, or the Price Intelligence team builds pricing models, these capabilities benefit every marketplace, but only if the underlying infrastructure supports seamless cross-BU deployment.</p><h3>The Platform Vision</h3><p>We stated our vision explicitly:</p><p><em>“Create a </em><strong><em>single Infrastructure Platform as a Service </em></strong><em>to enable any Product Engineering teams of a Business Entity in Carousell Group to </em><strong><em>rapidly</em></strong><em>, </em><strong><em>easily</em></strong><em>, </em><strong><em>safely</em></strong><em>, and </em><strong><em>cost-effectively build</em></strong><em>, </em><strong><em>deploy</em></strong><em>, </em><strong><em>operate</em></strong><em> and </em><strong><em>scale reliable</em></strong><em> and </em><strong><em>secure</em></strong><em> systems and applications. </em><strong><em>Converge mature businesses’</em></strong><em> infrastructure stack to this platform to achieve efficiency in technology cost and staffing.”</em></p><p>This model gives us a clear SLA and API boundary. It scopes common solutions beyond just raw infrastructure (which cloud providers already encapsulate well) into higher-value areas like observability, CI/CD, service frameworks, and configuration management.</p><h3>What the Platform Covers</h3><p>We defined six areas of concern, each evaluated across every milestone to determine whether a single common solution is required or multiple options can coexist:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BRaQ-wUs6DfF7Fvdg2bzbg.png" /></figure><p>For CI/CD, the answer was clearly “one solution”: you can’t have a cross-BU deployable service if each BU uses a different deployment pipeline. For logging, the answer was more nuanced: as long as logs are emitted in a standard way, the backend tooling could differ (though we converged over time).</p><h3>The Milestones</h3><p>We planned the platform rollout in three progressive milestones:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NFcxUDCaSfcm0SNxNTjlYg.png" /></figure><p>After the first milestone was delivered, subsequent work streams ran in parallel. We did not treat these as strictly sequential gates.</p><h3>The “Opportunistically Aggressive” Approach</h3><p>We considered three strategies: <em>Aggressive</em> (force-migrate everything fast, might risk business delivery speed), <em>Passive</em> (let each BU adopt organically, risk infinite overhead), and <strong>Opportunistically Aggressive</strong>, the one we chose.</p><p>The idea: identify specific areas to aggressively invest in and force a migration date, while constantly seeking opportunities to extend the same pattern to other areas. We iterate and align with each BU in a regular period.</p><h3>What Constitutes an Application a.k.a Service, Microservice ?</h3><p>Before building the platform, we had to answer a fundamental question: what are all the pieces that make a service work? The answer shaped every platform component we built.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gkpPV0iwbWD8QsRdYUP4jw.png" /></figure><p>Each of these components became a platform initiative. Together, they form the surface area that must be standardised for a service to be readily deployable across Carousell Group.</p><h3>Unlocking Group-Wide Data Intelligence</h3><p>A unified infrastructure platform isn’t just about deployment efficiency. When services across BUs share the same frameworks, emit the same metrics, and use the same data integration protocols, you unlock <strong>collective data intelligence</strong>.</p><p>This is what powers initiatives like <strong>Product Authority</strong>, knowing every product likely to be sold across all marketplaces and mapping listings to a canonical catalog and <strong>Price Intelligence</strong>, predicting sell prices and recommending buy/sell prices. These capabilities require data from all marketplaces, standardised through common schemas and APIs. Without a common infrastructure layer, building these group-wide capabilities would mean stitching together data from three different stacks with three different conventions.</p><h3>What Comes Next: The Blog Series</h3><p>This is the first post in a series covering how we built the platform that makes services readily deployable across Carousell Group. Each subsequent post deep-dives into a specific platform component:</p><ul><li><a href="https://medium.com/carousell-insider/service-definition-6125e61e2326"><strong>Service Definition</strong></a>, the YAML-based metadata spec that is the cornerstone of all automation</li><li><a href="https://medium.com/carousell-insider/api-definition-and-protobuffer-management-1e28b02e9b18"><strong>API Definition &amp; Protobuf Management</strong></a>, standardising API contracts and code generation across BUs</li><li><a href="https://medium.com/carousell-insider/secret-and-configuration-management-auditable-api-first-and-secure-at-scale-def805774be2"><strong>Secret Management &amp; Configuration Management</strong></a>, Vault-based secrets and a new config management platform</li><li><a href="https://medium.com/carousell-insider/unified-service-deployment-across-carousell-group-cc5f7fd9103f"><strong>Service Deployment</strong></a>, unified CI/CD with GitHub Actions, Helm, and Argo Rollouts</li><li><a href="https://medium.com/carousell-insider/framework-and-service-builder-98b46db2db4c"><strong>Framework &amp; Service Builder</strong></a>, the golang based framework and devctl tooling that scaffold production-ready services</li></ul><p>A service built from the new Service Builder, using the new framework, with its config managed by Config Manager, its secrets in Vault, its APIs defined in the shared proto repo, and deployed through the common CI/CD pipeline: that service works in all BUs’ without a single environment-specific change. That’s the goal.</p><p><em>This post is part of the Group Infrastructure Platform series on the Carousell Insider blog.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ac1b11aefedf" width="1" height="1" alt=""><hr><p><a href="https://medium.com/carousell-insider/common-tech-foundation-carousell-group-ac1b11aefedf">Common Tech Foundation at Carousell Group: Building One Platform to Scale Lean and Effectively</a> was originally published in <a href="https://medium.com/carousell-insider">Carousell Insider</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>