Menu
InfoQ Architecture·July 28, 2026

Migrating from Monoliths to Microservices with a 'Hard-Stop' Rule at Paycor

This article details Paycor's successful strategy to migrate from three monolithic applications to over 120 domain microservices using a 'hard-stop' rule. Instead of a dedicated migration project, every new feature, bug fix, or enhancement mandated the creation of a new domain service, effectively making the migration a side effect of regular product development. Key enablers included self-service provisioning, an API gateway for traffic routing, and a robust feature-flag system.

Read original on InfoQ Architecture

The 'Hard-Stop' Rule for Microservices Migration

Paycor adopted a unique approach to break down its monolithic applications into microservices, termed the 'hard-stop' rule. This rule dictated that any new development – be it a feature, bug fix, or enhancement – must carve out a new domain service rather than modifying the existing monolith. This strategy allowed the migration to be funded by the regular product roadmap budget, avoiding the common challenge of securing separate, large-scale migration funding. While this added an estimated 50% to individual story times (e.g., a 4-hour task became 6 hours), the cost was absorbed across many smaller changes rather than a single, high-stakes CapEx request.

Platform Investments for a Pull-Based Migration

  1. Subscription-per-Domain on Azure: Each product domain was assigned its own Azure subscription. This provided clear cost attribution, blast-radius isolation for misconfigurations, and fostered team accountability by making resource consumption transparent.
  2. Self-Service Provisioning: Critical for developer productivity, a provisioning template reduced new service setup from weeks to minutes. This automation was crucial for making the 50% time overhead of creating new services acceptable.
  3. API Management (APIM) as a Routing Seam: APIM was placed in front of all migrating endpoints. This allowed traffic to be gradually shifted from monolith endpoints to new microservices using deployment configurations and feature flags, without requiring client-side changes or awareness.
  4. Feature Flags with Cached Wrapper: Azure App Configuration for feature flags, augmented with a Redis-cached wrapper, enabled gradual rollouts and near-instantaneous rollbacks. The caching mechanism made feature flag checks inexpensive at high traffic volumes.
💡

Architectural Lesson: Incremental Migration Funding

Migrating away from a monolith doesn't always require a separate, large-scale budget. By integrating migration work into routine product development – making every change contribute to the decomposition – organizations can achieve significant architectural shifts incrementally. This approach hinges on robust platform support for rapid service provisioning and traffic routing.

High SLO Systems: Durable Event Ingestion

For critical Human Capital Management (HCM) systems like time-and-attendance and payroll, where data loss is unacceptable, a specific architectural pattern was implemented. Events from various sources (physical clocks, mobile apps, APIs) are first landed into an Azure Service Bus queue and then written to Azure Table Storage as the *durable record*. Only after this durable write is acknowledged is the source confirmed. This ensures that even if downstream processing fails, the event is safely recorded and recoverable.

  • Event Hub Fan-Out: From the durable record, an Azure Event Hub broadcasts events to multiple independent downstream consumers (e.g., punch processing, database of record, reporting, UI). Each consumer reads from its own consumer group, allowing independent scaling and fault isolation.
  • Deterministic Backfill: In case of downstream consumer failures, a deterministic backfill stream replays events from the durable record. Consumers maintain their own watermarks to ensure idempotency, preventing data loss even during outages.

Cost Engineering for Peak Traffic

To handle predictable traffic bursts (like daily clock-in spikes), Paycor combined scheduled pre-warming, reactive autoscaling, and serverless fan-out for event pipelines. This strategy reduced costs by approximately 70% compared to maintaining always-on peak capacity, demonstrating a pragmatic approach to optimizing cloud expenditure for variable workloads.

monolith-to-microservicesstrangler fig patternazureapi gatewayfeature flagsevent sourcingcost optimizationdevops

Comments

Loading comments...