Back to all use cases

ConsultingFinancial Services / Payments

The slow call was fanning out to every member because the data lived apart

European Card Processor

Function executions and queries across non-colocated partitioned regions were timing out under load. AceMQ redesigned the region layout around the access pattern and migrated the data with a side-by-side run.

Overview

A card processor used GemFire to hold accounts, authorisation holds and transaction history, and ran a balance function against them on every authorisation. As volumes grew, the function began to time out at peak, and adding members made it no better.

Challenge

Accounts and transactions sat in separate partitioned regions that were not colocated, so the function and the joining queries had to reach across members for data that belonged together. Colocation cannot be changed on a region that already holds data, which made the fix a migration rather than a setting.

Environment

GemFire 10.x on virtual machines: 8 servers, 3 locators, partitioned regions for accounts, holds and history, a small replicated region for reference data, Spring Boot services calling functions through the client API.

Approach

AceMQ engineers mapped each function and query to the keys it touched, chose the account identifier as the partitioning key with a partition resolver, and designed new colocated regions plus replicated regions for the small reference sets. Data was backfilled by function into the new regions while services dual wrote, then reads were switched and the old regions removed.

Solution

  1. Mapped every function and OQL query to the keys and regions it reads
  2. Chose the account identifier as the partitioning key and implemented a partition resolver for related regions
  3. Created new regions colocated with accounts, and replicated regions for small reference data
  4. Backfilled history into the new regions with a function while services dual wrote
  5. Rewrote the balance function to execute on a single member with a key filter
  6. Compared results side by side before switching reads, then dropped the old regions

Outcome

The balance function stopped fanning out across members and its 99th percentile at peak fell from about 1.4 seconds to under 200 milliseconds. Capacity planning went back to counting members per account volume, and the team had a design rule for placing any new region.

Technologies

GemFireJavaSpring

Need GemFire Architecture Guidance?

AceMQ's senior GemFire engineers have handled this exact type of engagement before. Whether you need architectural guidance, hands-on remediation, or an ongoing managed partnership, we're ready to help.