How we took fraud out of the hut

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.


Driving Fraud Example

, , , - . , n . , , , .


. - , .


, , .


:


  1. / - (, ).
  2. 1..n .
  3. : , .

web- — «». web- .


: , , , . .



- .


PHP . , . , .


«» , : , , .


. , , , JOIN- , .


, . « » ( ).


:


  • , . .
  • , .

. Golang, .


.


:


(, , ). , . .


, .


: 6 , 25 .


:


OLTP- , OLAP- . , «».


:


  1. SQL ( ) , ClickHouse’ .
  2. Elastic’.

Elastic. , « » , . , JOIN’ Elastic’.


Elastic , . Elastic . 2xx. (, ), allow_partial_search_results.



, , , , MySQL. RabbitMQ, .


RabbitMQ, , . .


, MySQL, , Elastic, . lock Redise, , , . .



REST API.


.



:


  1. Elastic , , refresh , . , ?
  2. MySQL ?

.

RabbitMQ ( ), — (retry).


producer, consumer’. dead-letter: TTL , .


, , , retry-, . , .


.

— refresh . Elasticsearch , .


: , . , , . , , .


, , ? , - , . , retry-?


TTL retry- Elastic, .


dead-letter .



: . 100% . testify, mock’ . , .



, . -, .


, , , NDA. .


, , , .

Source: https://habr.com/ru/post/undefined/


All Articles