Menu
InfoQ Cloud·July 28, 2026

Microservices Migration: The Hard-Stop Rule and Platform Unlocks for HCM Systems

This article details Paycor's successful migration from three HCM monoliths to over 120 domain microservices using a 'hard-stop rule,' where all new development carves out new services. It highlights crucial platform investments like self-service provisioning, an API gateway for traffic routing, and a Redis-cached feature flag system. The migration strategy emphasizes maintaining high availability and data integrity for critical HCM workloads like payroll and timekeeping, showcasing resilient ingestion paths and cost-effective peak traffic handling.

Read original on InfoQ Cloud

The Hard-Stop Rule: A Phased Migration Strategy

Paycor successfully migrated from three large HCM monoliths to over 120 domain microservices without a dedicated migration budget. The core strategy, termed the "hard-stop rule," dictated that every new feature, bug fix, or enhancement must be implemented as a new domain service, rather than modifying the existing monolith. This approach made migration a side effect of regular product development, distributing the cost across hundreds of stories rather than a single large capital expenditure request.

💡

Pull-Based Migration Strategy

Instead of a separate migration program, integrate the migration into daily development. This 'pull-based' approach amortizes the cost and risk across smaller, more frequent changes, making it more palatable for organizations with constrained budgets for non-revenue-generating projects.

Platform Investments for Successful Microservices Migration

  • Subscription-per-Domain: Adopting one Azure subscription per product domain (e.g., payroll, timekeeping) provided clear cost attribution, blast-radius isolation for misconfigurations, and fostered team accountability by making resource consumption transparent.
  • Self-Service Provisioning: Automating the provisioning of new services, including AKS namespaces, databases, message buses (Service Bus, Event Hub), Key Vault, and observability hooks, reduced setup time from weeks to minutes. This was critical for making the 50% overhead of building a new service acceptable to engineering teams.
  • API Gateway (APIM) as Routing Seam: Azure API Management (APIM) was used to route traffic between old monolith endpoints and new microservices. This enabled gradual rollouts (e.g., 1% of traffic to new service) and seamless cutovers without requiring client-side changes, ensuring a smooth transition for mobile apps and partner APIs.
  • Cached Feature Flags: A Redis-cached wrapper around Azure App Configuration provided a reliable, low-latency feature flag system. This supported gradual rollouts and, crucially, near-instant rollbacks (within seconds across all nodes) for misbehaving releases, enhancing system stability and reducing incident impact.

Architectural Commitments for High-Reliability HCM Systems

For critical workloads like time-and-attendance and payroll, stringent Service Level Objectives (SLOs) dictated specific architectural decisions. Losing a time punch or failing a payroll run has severe regulatory and financial consequences. The system prioritizes durability and recoverability.

  • Durable Event Ingestion: Events from ten diverse sources (e.g., physical clocks, mobile apps, POS systems) are first landed in an Azure Service Bus queue, then immediately written to Azure Table Storage as the durable record. Acknowledgment to the source only occurs after the durable write, ensuring no event is lost once received.
  • Event Hub Fan-Out and Deterministic Backfill: From the durable record, an Azure Event Hub broadcasts events to multiple downstream consumers (punch processing, database of record, reporting, UI). Each consumer reads from its own group, scaling and failing independently. In case of downstream failures, a deterministic backfill stream replays events from the durable record, with consumers managing watermarks for idempotent processing, guaranteeing no data loss.
  • Multi-Region Active-Active Payroll: The payroll system runs active-active across two Azure regions in the same regulatory jurisdiction to ensure high availability and disaster recovery. This is a targeted decision based on business criticality, as not all components warrant this level of replication due to cost considerations.

Cost Engineering for Peak Traffic

The time system experiences predictable daily traffic spikes between 8-9 AM. To handle millions of punches in a compressed five-minute window cost-effectively, Paycor combined scheduled pre-warming of resources, reactive autoscaling, and serverless fan-out for the event pipeline. This strategy achieved approximately 70% lower costs than maintaining always-on peak capacity, demonstrating smart resource management for bursty workloads.

microservices migrationstrangler figazureapi gatewayfeature flagsevent-driven architecturedata durabilityautoscaling

Comments

Loading comments...