AI Briefing
KO

Financial Services MSA Transition - DB Separation (Part 1)

·2023.07.17 10:55

Key point

Separating the loan comparison DB from the credit management service reduced load and coupling.

1 / 2

Details

Triggered by the launch of the financial identity protection service, the credit management service, which had shared the existing loan comparison DB, was separated and transitioned to MSA. The core goal was to reduce load on the main service and to break the tightly coupled structure with heavy dependencies on other services, thereby lowering the risk of incidents and maintenance burden.

The transition process started from a DDD perspective. Domain events were defined in the past tense, Bounded Contexts were divided based on business flow, and after selecting the Aggregate Root, functions that were not credit information were transferred to the appropriate teams and services. In this process, other-domain logic such as product information and Do-Not-Call information also became targets for separation.

Structural improvements were carried out together.

  • Removal of company-wide common modules (logging, user validation, etc.)
  • Changed the build tool from Maven to Gradle
  • Applied CQRS based on Multi Datasource
  • Separated Repository, Service, and Controller into Command/Query
  • Removed foreign keys and unused tables
  • Changed utf8 → utf8mb4 and Collation
  • Migrated push notification sending logic to Databricks

In the DB design, foreign keys were removed as much as possible. As the DBA recommended, foreign keys can cause performance degradation and increase DDL/DML management points, so this transition moved in the direction of reducing dependencies and lowering QPS and Latency burden.

At the application level, a JPA Repository access structure was built with a configuration that separates the read/write DBs. @EnableJpaRepositories along with explicit EntityManager and TransactionManager configuration were key, and separate configuration classes were set up to suit an environment handling 2 or more DBs.

After the transition, the QA and testing burden was also significant. Due to the nature of financial data, sections where real integration was difficult were replaced with a Mockup Server to reduce testing time, and traffic from the existing server to the new server was switched over using Ingress prefix redirect.

As a result, the loan comparison DB achieved about a 10% reduction in CPU Workload and a 20% reduction in weekday QPS. With the credit management DB becoming independent, and the deposit, asset, and batch management DBs also being reorganized into separately divided structures, the first stage of the MSA transition was completed.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.