My name is Nikita, I am a backend developer from the antifraud team in Citimobil. Today I will share with you a story about how we moved our service from a monolith to a separate service, how we came to this decision and what problems we encountered.
To start, I’ll talk a little about our service.
Antifraud 101
Our antifraud is a set of rules for identifying orders containing signs of fraud, fraud patterns.
, , .
:
- / - (, ).
- 1..n .
- : , .
web- — «». web- .
: , , , . .
- .
PHP . , . , .
«» , : , , .
. , , , JOIN- , .
, . « » ( ).
:
. Golang, .
.
:
(, , ). , . .
, .
: 6 , 25 .
:
OLTP- , OLAP- . , «».
:
- SQL ( ) , ClickHouse’ .
- Elastic’.
Elastic. , « » , . , JOIN’ Elastic’.
, , , , MySQL. RabbitMQ, .
RabbitMQ, , . .
, MySQL, , Elastic, . lock Redise, , , . .

REST API.
.
:
- Elastic , , refresh , . , ?
- MySQL ?
.
RabbitMQ ( ), — (retry).
producer, consumer’. dead-letter: TTL , .
, , , retry-, . , .
.
— refresh . Elasticsearch , .
: , . , , . , , .
, , ? , - , . , retry-?
TTL retry- Elastic, .
dead-letter .
: . 100% . testify, mock’ . , .
, . -, .
, , , NDA. .
, , , .