The context
The context
We worked with a compliance platform SaaS company that helps organisations achieve FINRA compliance. This platform is being used by Fortune 50 financial institutions for over 20 years. The platform helps with communications compliance, archiving, supervision and electronic discovery of digital communications.
The platform was built with legacy Apache Storm based topologies that processed over 20 million messages per day. This data processing topology would run as a background job every midnight and it would often take 10+ hours to finish. As traffic on the platform increased, the processing time increased as well, along with recurring platform reliability issues and increasing infrastructure cost.
We got involved in this project right from discovery of the scope till production implementation and handover. We helped prepare the business case for this project for the CTO and proposed a target state architecture of the final solution.
We worked with a compliance platform SaaS company that helps organisations achieve FINRA compliance. This platform is being used by Fortune 50 financial institutions for over 20 years. The platform helps with communications compliance, archiving, supervision and electronic discovery of digital communications.
The platform was built with legacy Apache Storm based topologies that processed over 20 million messages per day. This data processing topology would run as a background job every midnight and it would often take 10+ hours to finish. As traffic on the platform increased, the processing time increased as well, along with recurring platform reliability issues and increasing infrastructure cost.
We got involved in this project right from discovery of the scope till production implementation and handover. We helped prepare the business case for this project for the CTO and proposed a target state architecture of the final solution.
The challenge
The challenge
Frequent SLA breaches due to delays in processing pipeline: For high traffic days, pipeline would often get delayed. This caused frequent SLA breaches. Failure in processing a single message would cause the whole pipeline to be reprocessed.
Frequent SLA breaches due to delays in processing pipeline: For high traffic days, pipeline would often get delayed. This caused frequent SLA breaches. Failure in processing a single message would cause the whole pipeline to be reprocessed.
Frequent SLA breaches due to delays in processing pipeline: For high traffic days, pipeline would often get delayed. This caused frequent SLA breaches. Failure in processing a single message would cause the whole pipeline to be reprocessed.
Onboarding a new tenant would often take 4+ months: Adding a new tenant often meant making a lot of one-off changes in data pipeline and deployments. This resulted in 4+ months of time for customer onboarding resulting in customer churn.
Onboarding a new tenant would often take 4+ months: Adding a new tenant often meant making a lot of one-off changes in data pipeline and deployments. This resulted in 4+ months of time for customer onboarding resulting in customer churn.
Onboarding a new tenant would often take 4+ months: Adding a new tenant often meant making a lot of one-off changes in data pipeline and deployments. This resulted in 4+ months of time for customer onboarding resulting in customer churn.
Infrastructure cost grew by 40% for every new tenant: Adding a new tenant would often require rebalancing workloads on existing tenants (due to legacy architecture), thereby increasing the infrastructure cost for every new tenant onboarding.
Infrastructure cost grew by 40% for every new tenant: Adding a new tenant would often require rebalancing workloads on existing tenants (due to legacy architecture), thereby increasing the infrastructure cost for every new tenant onboarding.
Infrastructure cost grew by 40% for every new tenant: Adding a new tenant would often require rebalancing workloads on existing tenants (due to legacy architecture), thereby increasing the infrastructure cost for every new tenant onboarding.
Product iteration speed stalled, requiring months to launch simple features: Due to legacy architecture and tech debt, even simple product changes required many months to get ready.
Product iteration speed stalled, requiring months to launch simple features: Due to legacy architecture and tech debt, even simple product changes required many months to get ready.
Product iteration speed stalled, requiring months to launch simple features: Due to legacy architecture and tech debt, even simple product changes required many months to get ready.
The impact
The impact
Zero SLA breaches: We converted the existing batch processing pipeline to a streaming pipeline. This allowed us to retry failures independently instead of reprocessing the whole batch.
Zero SLA breaches: We converted the existing batch processing pipeline to a streaming pipeline. This allowed us to retry failures independently instead of reprocessing the whole batch.
Zero SLA breaches: We converted the existing batch processing pipeline to a streaming pipeline. This allowed us to retry failures independently instead of reprocessing the whole batch.
Zero SLA breaches: We converted the existing batch processing pipeline to a streaming pipeline. This allowed us to retry failures independently instead of reprocessing the whole batch.
Tenant onboarding in under a week: We were able to add a new customer without requiring a lot of one-off changes in data pipeline and deployments. This allowed the team to onboard new customers within days.
Tenant onboarding in under a week: We were able to add a new customer without requiring a lot of one-off changes in data pipeline and deployments. This allowed the team to onboard new customers within days.
Tenant onboarding in under a week: We were able to add a new customer without requiring a lot of one-off changes in data pipeline and deployments. This allowed the team to onboard new customers within days.
Tenant onboarding in under a week: We were able to add a new customer without requiring a lot of one-off changes in data pipeline and deployments. This allowed the team to onboard new customers within days.
COGS reduction by 40%: We modernized the architecture and infrastructure to reduce Cost of Goods Sold (COGS) by 40%. This improved unit economics of the SaaS and allowed new tenants to be added without linearly increasing infrastructure costs.
COGS reduction by 40%: We modernized the architecture and infrastructure to reduce Cost of Goods Sold (COGS) by 40%. This improved unit economics of the SaaS and allowed new tenants to be added without linearly increasing infrastructure costs.
COGS reduction by 40%: We modernized the architecture and infrastructure to reduce Cost of Goods Sold (COGS) by 40%. This improved unit economics of the SaaS and allowed new tenants to be added without linearly increasing infrastructure costs.
COGS reduction by 40%: We modernized the architecture and infrastructure to reduce Cost of Goods Sold (COGS) by 40%. This improved unit economics of the SaaS and allowed new tenants to be added without linearly increasing infrastructure costs.
New features go live in production in under a week: We split the platform into services that each own one business area. This allowed the team to release most product changes on their own, without a coordinated release across the whole application.
New features go live in production in under a week: We split the platform into services that each own one business area. This allowed the team to release most product changes on their own, without a coordinated release across the whole application.
New features go live in production in under a week: We split the platform into services that each own one business area. This allowed the team to release most product changes on their own, without a coordinated release across the whole application.
New features go live in production in under a week: We split the platform into services that each own one business area. This allowed the team to release most product changes on their own, without a coordinated release across the whole application.
The approach
The approach
The original architecture and why it couldn’t scale
The compliance platform captured employee communications such as email, chat and voice, and archived them throughout the day. Compliance reviewers needed to see alerts the following morning, based on messages sent the previous day.
The diagram below shows how the original pipeline met that requirement. At midnight, a batch producer pushed the previous day’s messages into Kafka. Storm workers evaluated each message against the customer’s compliance policies, and a sink topology wrote the alerts that reviewers saw in the morning.
Each tenant group ran its own copy of this pipeline.
Existing architecture: messages accumulated during the day and were processed in a single batch starting at midnight, with one deployment per tenant group.
The batch design made sense when the platform was first built. Message volumes were small, batch processing was the default approach for building data pipelines, and infrastructure that could scale on demand wasn’t mature enough. Processing messages overnight and making alerts available the next morning met the business requirement.
That changed as more financial institutions joined the platform. More customers meant more messages, and the batch architecture started running into four problems:
Frequent SLA breaches: The pipeline processed all of the day’s messages in a single batch that started at midnight. It had to finish within the 10-hour SLA, but on high-traffic days, processing took more than 10 hours. Since everything ran as one batch, even a single message failure could force the team to reprocess the entire run.
4+ months to onboard a new tenant: The Storm topology crashed when a single deployment handled too much message volume. To work around this, the platform team grouped tenants based on their message volumes and ran a separate deployment for each group. Onboarding a new tenant became a lengthy process.
Infrastructure costs grew with every tenant: Each tenant group’s infrastructure had to handle its peak message volume at midnight. For the rest of the day, most of that capacity was unused, but the platform continued paying for that idle capacity. This led to 40% increase in infrastructure costs for every new tenant.
Slow product iteration: Over time, business logic accumulated in a single codebase that used a shared data store. Even simple changes involved multiple components and required a coordinated release. As a result, features that should have been straightforward to ship took months to roll out to customers.
How we arrived at the target state architecture
We ran two Event Storming workshops with the client’s product, engineering, and compliance operations teams to understand the business workflows and identify the platform’s bounded contexts. We then used Domain-Driven Design (DDD) to define service boundaries around those contexts. We went through several design iterations with the client’s teams before agreeing on the target architecture.
The new architecture groups microservices by sub-domain. Each service owns its database, communicates with other services through Kafka, and scales independently on Kubernetes.
New architecture: Microservices grouped by sub-domain, each owning its database, communicating through Kafka, and autoscaling on Kubernetes.
How the target state architecture fixes the problems
Each architectural change addresses one of the problems in the original design.
Process messages as they arrive, show alerts the next day: The old design delayed processing until midnight because reviewers only needed to see alerts the following morning. We separated processing time from alert visibility. The platform now processes messages as soon as it captures them and assigns each alert a visibility date for the following day. Messages arriving just before midnight are processed in about 5 minutes, and failures trigger retries for individual messages instead of requiring the entire batch to run again. Reviewers still see alerts the next day, so their workflow remains unchanged.
Scale based on workload, not tenant groups: We replaced BOSH, which managed the old deployments, with Kubernetes. Kubernetes Event Driven Autoscaler (KEDA) monitors Kafka consumer lag and adds replicas when the backlog grows. The platform no longer needs separate deployments for groups of tenants. A new customer can now be onboarded in under a week without changing existing tenant deployments.
Pay for the capacity you use: Services scale down to a minimum when message traffic drops. This reduces the idle capacity the platform previously maintained for the midnight peak. Adding a new tenant no longer requires provisioning another fixed block of infrastructure.
Align service boundaries with business domains: We split the shared codebase into microservices, each owning its data and deployment lifecycle. Product changes can now stay within the service responsible for that business domain. Teams can release those changes independently instead of coordinating releases across the entire application.
Migrating to target state architecture in backward compatible manner
We knew the platform had to keep running throughout the migration. Financial institutions depended on it every day, so a big-bang cutover was not an option. Instead, we used the strangler fig pattern to replace the Storm pipeline incrementally.
Strangler fig: We replaced one part of the Storm pipeline at a time while the remaining components continued running on the old system.
Shadow mode: Each new component processed the same messages as the existing Storm pipeline, but its alerts weren’t visible to reviewers. Reviewers continued using alerts from the old system while we compared the outputs for each tenant. Both pipelines ran in parallel for a few weeks before we switched any tenant over.
Tenant migration: Once the new pipeline produced matching alerts, we moved tenants in batches, starting with the smallest group.
Rollback: We kept each tenant’s Storm deployment running until its migration was signed off. If anything went wrong, we could switch that tenant back to the old pipeline.
We completed the migration over a few weeks without a single Sev-1 incident. Reviewers continued receiving their next-day alerts throughout the process. After the last tenant moved to the new platform, we retired the old Storm pipeline.
Event Storming and Domain-Driven Design helped us define service boundaries around the business domains. The strangler fig approach let us replace the legacy system incrementally without disrupting the platform’s daily operations.
The original architecture and why it couldn’t scale
The compliance platform captured employee communications such as email, chat and voice, and archived them throughout the day. Compliance reviewers needed to see alerts the following morning, based on messages sent the previous day.
The diagram below shows how the original pipeline met that requirement. At midnight, a batch producer pushed the previous day’s messages into Kafka. Storm workers evaluated each message against the customer’s compliance policies, and a sink topology wrote the alerts that reviewers saw in the morning.
Each tenant group ran its own copy of this pipeline.
Existing architecture: messages accumulated during the day and were processed in a single batch starting at midnight, with one deployment per tenant group.
The batch design made sense when the platform was first built. Message volumes were small, batch processing was the default approach for building data pipelines, and infrastructure that could scale on demand wasn’t mature enough. Processing messages overnight and making alerts available the next morning met the business requirement.
That changed as more financial institutions joined the platform. More customers meant more messages, and the batch architecture started running into four problems:
Frequent SLA breaches: The pipeline processed all of the day’s messages in a single batch that started at midnight. It had to finish within the 10-hour SLA, but on high-traffic days, processing took more than 10 hours. Since everything ran as one batch, even a single message failure could force the team to reprocess the entire run.
4+ months to onboard a new tenant: The Storm topology crashed when a single deployment handled too much message volume. To work around this, the platform team grouped tenants based on their message volumes and ran a separate deployment for each group. Onboarding a new tenant became a lengthy process.
Infrastructure costs grew with every tenant: Each tenant group’s infrastructure had to handle its peak message volume at midnight. For the rest of the day, most of that capacity was unused, but the platform continued paying for that idle capacity. This led to 40% increase in infrastructure costs for every new tenant.
Slow product iteration: Over time, business logic accumulated in a single codebase that used a shared data store. Even simple changes involved multiple components and required a coordinated release. As a result, features that should have been straightforward to ship took months to roll out to customers.
How we arrived at the target state architecture
We ran two Event Storming workshops with the client’s product, engineering, and compliance operations teams to understand the business workflows and identify the platform’s bounded contexts. We then used Domain-Driven Design (DDD) to define service boundaries around those contexts. We went through several design iterations with the client’s teams before agreeing on the target architecture.
The new architecture groups microservices by sub-domain. Each service owns its database, communicates with other services through Kafka, and scales independently on Kubernetes.
New architecture: Microservices grouped by sub-domain, each owning its database, communicating through Kafka, and autoscaling on Kubernetes.
How the target state architecture fixes the problems
Each architectural change addresses one of the problems in the original design.
Process messages as they arrive, show alerts the next day: The old design delayed processing until midnight because reviewers only needed to see alerts the following morning. We separated processing time from alert visibility. The platform now processes messages as soon as it captures them and assigns each alert a visibility date for the following day. Messages arriving just before midnight are processed in about 5 minutes, and failures trigger retries for individual messages instead of requiring the entire batch to run again. Reviewers still see alerts the next day, so their workflow remains unchanged.
Scale based on workload, not tenant groups: We replaced BOSH, which managed the old deployments, with Kubernetes. Kubernetes Event Driven Autoscaler (KEDA) monitors Kafka consumer lag and adds replicas when the backlog grows. The platform no longer needs separate deployments for groups of tenants. A new customer can now be onboarded in under a week without changing existing tenant deployments.
Pay for the capacity you use: Services scale down to a minimum when message traffic drops. This reduces the idle capacity the platform previously maintained for the midnight peak. Adding a new tenant no longer requires provisioning another fixed block of infrastructure.
Align service boundaries with business domains: We split the shared codebase into microservices, each owning its data and deployment lifecycle. Product changes can now stay within the service responsible for that business domain. Teams can release those changes independently instead of coordinating releases across the entire application.
Migrating to target state architecture in backward compatible manner
We knew the platform had to keep running throughout the migration. Financial institutions depended on it every day, so a big-bang cutover was not an option. Instead, we used the strangler fig pattern to replace the Storm pipeline incrementally.
Strangler fig: We replaced one part of the Storm pipeline at a time while the remaining components continued running on the old system.
Shadow mode: Each new component processed the same messages as the existing Storm pipeline, but its alerts weren’t visible to reviewers. Reviewers continued using alerts from the old system while we compared the outputs for each tenant. Both pipelines ran in parallel for a few weeks before we switched any tenant over.
Tenant migration: Once the new pipeline produced matching alerts, we moved tenants in batches, starting with the smallest group.
Rollback: We kept each tenant’s Storm deployment running until its migration was signed off. If anything went wrong, we could switch that tenant back to the old pipeline.
We completed the migration over a few weeks without a single Sev-1 incident. Reviewers continued receiving their next-day alerts throughout the process. After the last tenant moved to the new platform, we retired the old Storm pipeline.
Event Storming and Domain-Driven Design helped us define service boundaries around the business domains. The strangler fig approach let us replace the legacy system incrementally without disrupting the platform’s daily operations.
The original architecture and why it couldn’t scale
The compliance platform captured employee communications such as email, chat and voice, and archived them throughout the day. Compliance reviewers needed to see alerts the following morning, based on messages sent the previous day.
The diagram below shows how the original pipeline met that requirement. At midnight, a batch producer pushed the previous day’s messages into Kafka. Storm workers evaluated each message against the customer’s compliance policies, and a sink topology wrote the alerts that reviewers saw in the morning.
Each tenant group ran its own copy of this pipeline.
Existing architecture: messages accumulated during the day and were processed in a single batch starting at midnight, with one deployment per tenant group.
The batch design made sense when the platform was first built. Message volumes were small, batch processing was the default approach for building data pipelines, and infrastructure that could scale on demand wasn’t mature enough. Processing messages overnight and making alerts available the next morning met the business requirement.
That changed as more financial institutions joined the platform. More customers meant more messages, and the batch architecture started running into four problems:
Frequent SLA breaches: The pipeline processed all of the day’s messages in a single batch that started at midnight. It had to finish within the 10-hour SLA, but on high-traffic days, processing took more than 10 hours. Since everything ran as one batch, even a single message failure could force the team to reprocess the entire run.
4+ months to onboard a new tenant: The Storm topology crashed when a single deployment handled too much message volume. To work around this, the platform team grouped tenants based on their message volumes and ran a separate deployment for each group. Onboarding a new tenant became a lengthy process.
Infrastructure costs grew with every tenant: Each tenant group’s infrastructure had to handle its peak message volume at midnight. For the rest of the day, most of that capacity was unused, but the platform continued paying for that idle capacity. This led to 40% increase in infrastructure costs for every new tenant.
Slow product iteration: Over time, business logic accumulated in a single codebase that used a shared data store. Even simple changes involved multiple components and required a coordinated release. As a result, features that should have been straightforward to ship took months to roll out to customers.
How we arrived at the target state architecture
We ran two Event Storming workshops with the client’s product, engineering, and compliance operations teams to understand the business workflows and identify the platform’s bounded contexts. We then used Domain-Driven Design (DDD) to define service boundaries around those contexts. We went through several design iterations with the client’s teams before agreeing on the target architecture.
The new architecture groups microservices by sub-domain. Each service owns its database, communicates with other services through Kafka, and scales independently on Kubernetes.
New architecture: Microservices grouped by sub-domain, each owning its database, communicating through Kafka, and autoscaling on Kubernetes.
How the target state architecture fixes the problems
Each architectural change addresses one of the problems in the original design.
Process messages as they arrive, show alerts the next day: The old design delayed processing until midnight because reviewers only needed to see alerts the following morning. We separated processing time from alert visibility. The platform now processes messages as soon as it captures them and assigns each alert a visibility date for the following day. Messages arriving just before midnight are processed in about 5 minutes, and failures trigger retries for individual messages instead of requiring the entire batch to run again. Reviewers still see alerts the next day, so their workflow remains unchanged.
Scale based on workload, not tenant groups: We replaced BOSH, which managed the old deployments, with Kubernetes. Kubernetes Event Driven Autoscaler (KEDA) monitors Kafka consumer lag and adds replicas when the backlog grows. The platform no longer needs separate deployments for groups of tenants. A new customer can now be onboarded in under a week without changing existing tenant deployments.
Pay for the capacity you use: Services scale down to a minimum when message traffic drops. This reduces the idle capacity the platform previously maintained for the midnight peak. Adding a new tenant no longer requires provisioning another fixed block of infrastructure.
Align service boundaries with business domains: We split the shared codebase into microservices, each owning its data and deployment lifecycle. Product changes can now stay within the service responsible for that business domain. Teams can release those changes independently instead of coordinating releases across the entire application.
Migrating to target state architecture in backward compatible manner
We knew the platform had to keep running throughout the migration. Financial institutions depended on it every day, so a big-bang cutover was not an option. Instead, we used the strangler fig pattern to replace the Storm pipeline incrementally.
Strangler fig: We replaced one part of the Storm pipeline at a time while the remaining components continued running on the old system.
Shadow mode: Each new component processed the same messages as the existing Storm pipeline, but its alerts weren’t visible to reviewers. Reviewers continued using alerts from the old system while we compared the outputs for each tenant. Both pipelines ran in parallel for a few weeks before we switched any tenant over.
Tenant migration: Once the new pipeline produced matching alerts, we moved tenants in batches, starting with the smallest group.
Rollback: We kept each tenant’s Storm deployment running until its migration was signed off. If anything went wrong, we could switch that tenant back to the old pipeline.
We completed the migration over a few weeks without a single Sev-1 incident. Reviewers continued receiving their next-day alerts throughout the process. After the last tenant moved to the new platform, we retired the old Storm pipeline.
Event Storming and Domain-Driven Design helped us define service boundaries around the business domains. The strangler fig approach let us replace the legacy system incrementally without disrupting the platform’s daily operations.
The original architecture and why it couldn’t scale
The compliance platform captured employee communications such as email, chat and voice, and archived them throughout the day. Compliance reviewers needed to see alerts the following morning, based on messages sent the previous day.
The diagram below shows how the original pipeline met that requirement. At midnight, a batch producer pushed the previous day’s messages into Kafka. Storm workers evaluated each message against the customer’s compliance policies, and a sink topology wrote the alerts that reviewers saw in the morning.
Each tenant group ran its own copy of this pipeline.
Existing architecture: messages accumulated during the day and were processed in a single batch starting at midnight, with one deployment per tenant group.
The batch design made sense when the platform was first built. Message volumes were small, batch processing was the default approach for building data pipelines, and infrastructure that could scale on demand wasn’t mature enough. Processing messages overnight and making alerts available the next morning met the business requirement.
That changed as more financial institutions joined the platform. More customers meant more messages, and the batch architecture started running into four problems:
Frequent SLA breaches: The pipeline processed all of the day’s messages in a single batch that started at midnight. It had to finish within the 10-hour SLA, but on high-traffic days, processing took more than 10 hours. Since everything ran as one batch, even a single message failure could force the team to reprocess the entire run.
4+ months to onboard a new tenant: The Storm topology crashed when a single deployment handled too much message volume. To work around this, the platform team grouped tenants based on their message volumes and ran a separate deployment for each group. Onboarding a new tenant became a lengthy process.
Infrastructure costs grew with every tenant: Each tenant group’s infrastructure had to handle its peak message volume at midnight. For the rest of the day, most of that capacity was unused, but the platform continued paying for that idle capacity. This led to 40% increase in infrastructure costs for every new tenant.
Slow product iteration: Over time, business logic accumulated in a single codebase that used a shared data store. Even simple changes involved multiple components and required a coordinated release. As a result, features that should have been straightforward to ship took months to roll out to customers.
How we arrived at the target state architecture
We ran two Event Storming workshops with the client’s product, engineering, and compliance operations teams to understand the business workflows and identify the platform’s bounded contexts. We then used Domain-Driven Design (DDD) to define service boundaries around those contexts. We went through several design iterations with the client’s teams before agreeing on the target architecture.
The new architecture groups microservices by sub-domain. Each service owns its database, communicates with other services through Kafka, and scales independently on Kubernetes.
New architecture: Microservices grouped by sub-domain, each owning its database, communicating through Kafka, and autoscaling on Kubernetes.
How the target state architecture fixes the problems
Each architectural change addresses one of the problems in the original design.
Process messages as they arrive, show alerts the next day: The old design delayed processing until midnight because reviewers only needed to see alerts the following morning. We separated processing time from alert visibility. The platform now processes messages as soon as it captures them and assigns each alert a visibility date for the following day. Messages arriving just before midnight are processed in about 5 minutes, and failures trigger retries for individual messages instead of requiring the entire batch to run again. Reviewers still see alerts the next day, so their workflow remains unchanged.
Scale based on workload, not tenant groups: We replaced BOSH, which managed the old deployments, with Kubernetes. Kubernetes Event Driven Autoscaler (KEDA) monitors Kafka consumer lag and adds replicas when the backlog grows. The platform no longer needs separate deployments for groups of tenants. A new customer can now be onboarded in under a week without changing existing tenant deployments.
Pay for the capacity you use: Services scale down to a minimum when message traffic drops. This reduces the idle capacity the platform previously maintained for the midnight peak. Adding a new tenant no longer requires provisioning another fixed block of infrastructure.
Align service boundaries with business domains: We split the shared codebase into microservices, each owning its data and deployment lifecycle. Product changes can now stay within the service responsible for that business domain. Teams can release those changes independently instead of coordinating releases across the entire application.
Migrating to target state architecture in backward compatible manner
We knew the platform had to keep running throughout the migration. Financial institutions depended on it every day, so a big-bang cutover was not an option. Instead, we used the strangler fig pattern to replace the Storm pipeline incrementally.
Strangler fig: We replaced one part of the Storm pipeline at a time while the remaining components continued running on the old system.
Shadow mode: Each new component processed the same messages as the existing Storm pipeline, but its alerts weren’t visible to reviewers. Reviewers continued using alerts from the old system while we compared the outputs for each tenant. Both pipelines ran in parallel for a few weeks before we switched any tenant over.
Tenant migration: Once the new pipeline produced matching alerts, we moved tenants in batches, starting with the smallest group.
Rollback: We kept each tenant’s Storm deployment running until its migration was signed off. If anything went wrong, we could switch that tenant back to the old pipeline.
We completed the migration over a few weeks without a single Sev-1 incident. Reviewers continued receiving their next-day alerts throughout the process. After the last tenant moved to the new platform, we retired the old Storm pipeline.
Event Storming and Domain-Driven Design helped us define service boundaries around the business domains. The strangler fig approach let us replace the legacy system incrementally without disrupting the platform’s daily operations.
The original architecture and why it couldn’t scale
The compliance platform captured employee communications such as email, chat and voice, and archived them throughout the day. Compliance reviewers needed to see alerts the following morning, based on messages sent the previous day.
The diagram below shows how the original pipeline met that requirement. At midnight, a batch producer pushed the previous day’s messages into Kafka. Storm workers evaluated each message against the customer’s compliance policies, and a sink topology wrote the alerts that reviewers saw in the morning.
Each tenant group ran its own copy of this pipeline.
Existing architecture: messages accumulated during the day and were processed in a single batch starting at midnight, with one deployment per tenant group.
The batch design made sense when the platform was first built. Message volumes were small, batch processing was the default approach for building data pipelines, and infrastructure that could scale on demand wasn’t mature enough. Processing messages overnight and making alerts available the next morning met the business requirement.
That changed as more financial institutions joined the platform. More customers meant more messages, and the batch architecture started running into four problems:
Frequent SLA breaches: The pipeline processed all of the day’s messages in a single batch that started at midnight. It had to finish within the 10-hour SLA, but on high-traffic days, processing took more than 10 hours. Since everything ran as one batch, even a single message failure could force the team to reprocess the entire run.
4+ months to onboard a new tenant: The Storm topology crashed when a single deployment handled too much message volume. To work around this, the platform team grouped tenants based on their message volumes and ran a separate deployment for each group. Onboarding a new tenant became a lengthy process.
Infrastructure costs grew with every tenant: Each tenant group’s infrastructure had to handle its peak message volume at midnight. For the rest of the day, most of that capacity was unused, but the platform continued paying for that idle capacity. This led to 40% increase in infrastructure costs for every new tenant.
Slow product iteration: Over time, business logic accumulated in a single codebase that used a shared data store. Even simple changes involved multiple components and required a coordinated release. As a result, features that should have been straightforward to ship took months to roll out to customers.
How we arrived at the target state architecture
We ran two Event Storming workshops with the client’s product, engineering, and compliance operations teams to understand the business workflows and identify the platform’s bounded contexts. We then used Domain-Driven Design (DDD) to define service boundaries around those contexts. We went through several design iterations with the client’s teams before agreeing on the target architecture.
The new architecture groups microservices by sub-domain. Each service owns its database, communicates with other services through Kafka, and scales independently on Kubernetes.
New architecture: Microservices grouped by sub-domain, each owning its database, communicating through Kafka, and autoscaling on Kubernetes.
How the target state architecture fixes the problems
Each architectural change addresses one of the problems in the original design.
Process messages as they arrive, show alerts the next day: The old design delayed processing until midnight because reviewers only needed to see alerts the following morning. We separated processing time from alert visibility. The platform now processes messages as soon as it captures them and assigns each alert a visibility date for the following day. Messages arriving just before midnight are processed in about 5 minutes, and failures trigger retries for individual messages instead of requiring the entire batch to run again. Reviewers still see alerts the next day, so their workflow remains unchanged.
Scale based on workload, not tenant groups: We replaced BOSH, which managed the old deployments, with Kubernetes. Kubernetes Event Driven Autoscaler (KEDA) monitors Kafka consumer lag and adds replicas when the backlog grows. The platform no longer needs separate deployments for groups of tenants. A new customer can now be onboarded in under a week without changing existing tenant deployments.
Pay for the capacity you use: Services scale down to a minimum when message traffic drops. This reduces the idle capacity the platform previously maintained for the midnight peak. Adding a new tenant no longer requires provisioning another fixed block of infrastructure.
Align service boundaries with business domains: We split the shared codebase into microservices, each owning its data and deployment lifecycle. Product changes can now stay within the service responsible for that business domain. Teams can release those changes independently instead of coordinating releases across the entire application.
Migrating to target state architecture in backward compatible manner
We knew the platform had to keep running throughout the migration. Financial institutions depended on it every day, so a big-bang cutover was not an option. Instead, we used the strangler fig pattern to replace the Storm pipeline incrementally.
Strangler fig: We replaced one part of the Storm pipeline at a time while the remaining components continued running on the old system.
Shadow mode: Each new component processed the same messages as the existing Storm pipeline, but its alerts weren’t visible to reviewers. Reviewers continued using alerts from the old system while we compared the outputs for each tenant. Both pipelines ran in parallel for a few weeks before we switched any tenant over.
Tenant migration: Once the new pipeline produced matching alerts, we moved tenants in batches, starting with the smallest group.
Rollback: We kept each tenant’s Storm deployment running until its migration was signed off. If anything went wrong, we could switch that tenant back to the old pipeline.
We completed the migration over a few weeks without a single Sev-1 incident. Reviewers continued receiving their next-day alerts throughout the process. After the last tenant moved to the new platform, we retired the old Storm pipeline.
Event Storming and Domain-Driven Design helped us define service boundaries around the business domains. The strangler fig approach let us replace the legacy system incrementally without disrupting the platform’s daily operations.
Download this case study
Download this case study
A PDF version to read later or share with your team.
A PDF version to read later or share with your team.









