{"id":22784,"date":"2021-05-05T06:42:00","date_gmt":"2021-05-05T06:42:00","guid":{"rendered":"https:\/\/www.experfy.com\/blog\/data-consistency-in-microservices-architecture\/"},"modified":"2023-08-23T13:26:27","modified_gmt":"2023-08-23T13:26:27","slug":"data-consistency-in-microservices-architecture","status":"publish","type":"post","link":"https:\/\/www.experfy.com\/blog\/bigdata-cloud\/data-consistency-in-microservices-architecture\/","title":{"rendered":"Data Consistency In Microservices Architecture"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"22784\" class=\"elementor elementor-22784\" data-elementor-post-type=\"post\">\n\t\t\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-49e4b48 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"49e4b48\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-d1d5adb\" data-id=\"d1d5adb\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-f150c67 elementor-widget elementor-widget-text-editor\" data-id=\"f150c67\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>In this article, I\u2019d like to share my knowledge and experience in\u00a0<strong>Garanti BBVA<\/strong>, about moving\u00a0<strong>from monolithic to microservices architectures<\/strong>, especially regarding\u00a0<strong>data consistency<\/strong>.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-52862c2 elementor-widget elementor-widget-text-editor\" data-id=\"52862c2\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Data consistency is hardest part of the microservices architecture. Because\u00a0in a traditional monolith <a href=\"https:\/\/www.experfy.com\/blog\/bigdata-cloud\/fifteen-plus-fundamental-rules-for-fintech-app-developer-part-two\/\" target=\"_blank\" rel=\"noreferrer noopener\">application<\/a>, a shared relational database handles data consistency. In a microservices architecture, each microservice has its own data store if you are using\u00a0<strong>database per service<\/strong>\u00a0pattern. So databases are\u00a0<strong>distributed\u00a0<\/strong>among the applications. Each application may use different technologies to manage their data like non-sql databases. Although this kind of distributed architecture has many benefits such as scalability, high availability, agility etc., in terms of data management, there are some critical points regarding data such as transaction management and data consistency\/integrity.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8fc2c7f elementor-widget elementor-widget-image\" data-id=\"8fc2c7f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t<figure class=\"wp-caption\">\n\t\t\t\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"441\" src=\"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2021\/05\/1hJ-Mu2gk7w5h8D7qu90Rvw-1024x441.png\" class=\"attachment-large size-large wp-image-19298\" alt=\"Data Consistency In Microservices Architecture\" srcset=\"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2021\/05\/1hJ-Mu2gk7w5h8D7qu90Rvw-1024x441.png 1024w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2021\/05\/1hJ-Mu2gk7w5h8D7qu90Rvw-300x129.png 300w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2021\/05\/1hJ-Mu2gk7w5h8D7qu90Rvw-768x331.png 768w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2021\/05\/1hJ-Mu2gk7w5h8D7qu90Rvw-610x263.png 610w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2021\/05\/1hJ-Mu2gk7w5h8D7qu90Rvw-750x323.png 750w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2021\/05\/1hJ-Mu2gk7w5h8D7qu90Rvw.png 1064w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/>\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">Figure 1. Sample Overall Transition Diagram<\/figcaption>\n\t\t\t\t\t\t\t\t\t\t<\/figure>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7af5f17 elementor-widget elementor-widget-text-editor\" data-id=\"7af5f17\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"103f\">In the distributed architecture, data is highly available and scalable because each microservice has its own runtime and data store.<\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7cef5e6 elementor-widget elementor-widget-heading\" data-id=\"7cef5e6\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">The Problem: Data Consistency in Distributed Systems<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-80a25bc elementor-widget elementor-widget-text-editor\" data-id=\"80a25bc\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"97a5\">For monolith applications, a shared relational database handles and guarantee data consistency by\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/ACID\" rel=\"noopener\"><strong>ACID<\/strong><\/a>transactions. The acronym ACID means:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-bc0abd7 elementor-widget elementor-widget-text-editor\" data-id=\"bc0abd7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<ul>\n<li><strong>A<\/strong>tomicity: all the steps of a transaction is succeeded or failed together, no partial state, all or nothing.<\/li>\n<li><strong>C<\/strong>onsistency: all data in the database is consistent at the end of transaction.<\/li>\n<li><strong>I<\/strong>solation: only one transaction can touch the data in the same time, other transactions wait until completion of the working transaction.<\/li>\n<li><strong>D<\/strong>urability: data is persisted in the database at the end of the transaction.<\/li>\n<\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-79714c4 elementor-widget elementor-widget-text-editor\" data-id=\"79714c4\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"1157\">In order to maintain strong data consistency, relational database management systems support\u00a0<strong>ACID<\/strong>\u00a0properties.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-fb0d875 elementor-widget elementor-widget-image\" data-id=\"fb0d875\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t<figure class=\"wp-caption\">\n\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"523\" height=\"366\" src=\"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2021\/05\/1AKnWPWPT56Cb7JSSdpLFaA.png\" class=\"attachment-large size-large wp-image-19299\" alt=\"Sample Sequence Diagram Of Monolithic Application\" srcset=\"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2021\/05\/1AKnWPWPT56Cb7JSSdpLFaA.png 523w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2021\/05\/1AKnWPWPT56Cb7JSSdpLFaA-300x210.png 300w\" sizes=\"(max-width: 523px) 100vw, 523px\" \/>\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">Figure 2. Sample Sequence Diagram of Monolithic Application<\/figcaption>\n\t\t\t\t\t\t\t\t\t\t<\/figure>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f08dda2 elementor-widget elementor-widget-text-editor\" data-id=\"f08dda2\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"630c\">But in a microservices architecture, each microservice has its own data store which has different technologies. So, there is\u00a0<strong>no central database<\/strong>,\u00a0<strong>no single unit of work<\/strong>. Business logic is spanned to the multiple local transactions. This means that you can\u2019t use single transaction unit of work among databases in a microservices architecture. But you still need the ACID properties in your application.<\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3be6425 elementor-widget elementor-widget-image\" data-id=\"3be6425\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t<figure class=\"wp-caption\">\n\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"606\" height=\"402\" src=\"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2021\/05\/1ZAFdGYOaZQj62XyOfEjiFw.png\" class=\"attachment-large size-large wp-image-19300\" alt=\"Data Consistency In Microservices Architecture\" srcset=\"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2021\/05\/1ZAFdGYOaZQj62XyOfEjiFw.png 606w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2021\/05\/1ZAFdGYOaZQj62XyOfEjiFw-300x199.png 300w\" sizes=\"(max-width: 606px) 100vw, 606px\" \/>\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">Figure 3. Sample Microservices Interaction Diagram<\/figcaption>\n\t\t\t\t\t\t\t\t\t\t<\/figure>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b839a75 elementor-widget elementor-widget-text-editor\" data-id=\"b839a75\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"921d\">Let\u2019s explain with a simple\u00a0<strong>sample scenario<\/strong>. In an order management system, there might be services such as stock management, payment and order management. Let\u2019s assume that these services are designed in accordance with microservice architecture and database per service pattern is applied. In order to complete the order process, the order service first calls the Stock Management service for stock control and reservation, and the relevant products in the order are reserved for not selling to another customer. The second step is the payment step. Payment service is responsible for the payment business. Order Service calls the Payment Service and completes the payment from the customer\u2019s credit card. Since each one is a separate service, updates over the separated DBs are committed within the service scope. The last step is creating order record. In this step, let\u2019s say a technical error has occurred and the order record could not be created, the order number could not be sent to the customer, but the payment was received from the customer.\u00a0<strong>Data consistency problem occurred\u00a0<\/strong>here. I will talk about what can be done after this point in the Possible Solutions section in the rest of the article.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-031ba22 elementor-widget elementor-widget-image\" data-id=\"031ba22\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t<figure class=\"wp-caption\">\n\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"808\" height=\"376\" src=\"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2021\/05\/14IfsBTbf53mszzc44OWwLw.png\" class=\"attachment-large size-large wp-image-19301\" alt=\"Data Consistency In Microservices Architecture\" srcset=\"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2021\/05\/14IfsBTbf53mszzc44OWwLw.png 808w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2021\/05\/14IfsBTbf53mszzc44OWwLw-300x140.png 300w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2021\/05\/14IfsBTbf53mszzc44OWwLw-768x357.png 768w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2021\/05\/14IfsBTbf53mszzc44OWwLw-610x284.png 610w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2021\/05\/14IfsBTbf53mszzc44OWwLw-750x349.png 750w\" sizes=\"(max-width: 808px) 100vw, 808px\" \/>\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">Figure 4. Sample Sequence Diagram of Microservices<\/figcaption>\n\t\t\t\t\t\t\t\t\t\t<\/figure>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9d1c855 elementor-widget elementor-widget-heading\" data-id=\"9d1c855\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Possible Solutions<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0baecb9 elementor-widget elementor-widget-text-editor\" data-id=\"0baecb9\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"a761\">First of all, there is no single solution which works well for each case. Different solutions can be applied depending on the use-case.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-2fcc801 elementor-widget elementor-widget-text-editor\" data-id=\"2fcc801\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"6e2a\">There are two main approaches to solve the problem:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c0a245f elementor-widget elementor-widget-text-editor\" data-id=\"c0a245f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<ul>\n<li><strong>Distributed transactions<\/strong><\/li>\n<li><strong>Eventual consistency<\/strong><\/li>\n<\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4ce5f85 elementor-widget elementor-widget-heading\" data-id=\"4ce5f85\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Distributed Transactions<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3ac7067 elementor-widget elementor-widget-text-editor\" data-id=\"3ac7067\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"d80b\">In a distributed transaction, transactions are executed on two or more resources (e.g. databases, message queues). Data integrity is guaranteed across multiple databases by distributed transaction manager or coordinator.<\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-280a3c2 elementor-widget elementor-widget-text-editor\" data-id=\"280a3c2\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"883f\">A distributed transaction is a very complex process since multiple resources are involved in the process.<\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d694d35 elementor-widget elementor-widget-text-editor\" data-id=\"d694d35\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"2685\"><strong>Two-phase commit(2PC)<\/strong>\u00a0is a blocking protocol used to guarantee that all the transactions are succeeded or failed together in a distributed transaction.<\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-57345bb elementor-widget elementor-widget-text-editor\" data-id=\"57345bb\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"0b0a\">The\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/X\/Open_XA\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>XA standard<\/strong><\/a>\u00a0is a specification for the 2PC distributed transactions. JTA includes standard API for XA. JTA-compliant application servers support XA out-of-the-box. But all the resources have to be deployed to a single JTA platform to run 2PC. For a microservice architecture, it is not suitable.<\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-88e5a7c elementor-widget elementor-widget-heading\" data-id=\"88e5a7c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Benefits of Distributed Transactions<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-87a7313 elementor-widget elementor-widget-text-editor\" data-id=\"87a7313\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<ul>\n<li><strong>Strong\u00a0<\/strong>data consistency<\/li>\n<li>Support\u00a0<strong>ACID\u00a0<\/strong>features<\/li>\n<\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-fc7be91 elementor-widget elementor-widget-heading\" data-id=\"fc7be91\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Drawbacks of Distributed Transactions<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-019954b elementor-widget elementor-widget-text-editor\" data-id=\"019954b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<ul>\n<li>Very complex process to maintain<\/li>\n<li><strong>High latency\u00a0<\/strong>&amp;\u00a0<strong>low throughput\u00a0<\/strong>since it is a blocking process (not suitable for high load scenarios)<\/li>\n<li>Possible\u00a0<strong>deadlocks\u00a0<\/strong>between transactions<\/li>\n<li>Transaction coordinator is a\u00a0<strong>single point of failure<\/strong><\/li>\n<\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-aff6e39 elementor-widget elementor-widget-heading\" data-id=\"aff6e39\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Eventual Consistency<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-05e3589 elementor-widget elementor-widget-text-editor\" data-id=\"05e3589\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"d1e6\"><strong>Eventual consistency<\/strong>\u00a0is a model used in distributed systems to achieve high availability. In an eventual consistent system<strong>,<\/strong>\u00a0inconsistencies are allowed for a short time until solving the problem of distributed data.<\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-101768a elementor-widget elementor-widget-text-editor\" data-id=\"101768a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"343c\">This model doesn\u2019t apply to distributed ACID transactions across microservices. Eventual consistency uses the\u00a0<strong>BASE<\/strong>\u00a0database model.<\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f127b9a elementor-widget elementor-widget-text-editor\" data-id=\"f127b9a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"83df\">While ACID model is providing a consistent system, BASE model provides high availability.<\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9fb1002 elementor-widget elementor-widget-text-editor\" data-id=\"9fb1002\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"dae5\">The acronym\u00a0<strong>BASE\u00a0<\/strong>means;<\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-cb0aec7 elementor-widget elementor-widget-text-editor\" data-id=\"cb0aec7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<ul>\n<li><strong>B<\/strong>asically<strong>\u00a0A<\/strong>vailable<strong>:\u00a0<\/strong>ensures availability of data by replicating it across the nodes of the database cluster<\/li>\n<li><strong>S<\/strong>oft-state<strong>:\u00a0<\/strong>due to lock of the strong consistency data may change over the time. Consistency responsibility is delegated to the developers.<\/li>\n<li><strong>E<\/strong>ventual consistency: immediate consistency may not possible with BASE but consistency will be provided eventually (in a short time).<\/li>\n<\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5f647ce elementor-widget elementor-widget-text-editor\" data-id=\"5f647ce\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<blockquote class=\"wp-block-quote\">\n<p><strong>SAGA\u00a0<\/strong>is a common pattern that operates the eventual consistency model.<\/p>\n<\/blockquote>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ca60df6 elementor-widget elementor-widget-text-editor\" data-id=\"ca60df6\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"c507\">The Saga pattern is an asynchronous model, based on a series of services. In a Saga pattern, the distributed transaction is performed by asynchronous local transactions on all related microservices. Each services updates their own data in a local transaction. Saga manages the execution of the sequence of services.<\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f075f5a elementor-widget elementor-widget-text-editor\" data-id=\"f075f5a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"a427\">Two most common implementations of Saga transactions are:<\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0dea745 elementor-widget elementor-widget-text-editor\" data-id=\"0dea745\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"dda0\"><strong>Choreography-based SAGA<\/strong>: No central coordinator exists in this case. Each service produces an event after completion of its task and each service listens to events to take an action. This pattern requires an mature event-driven architecture.<\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6503c96 elementor-widget elementor-widget-text-editor\" data-id=\"6503c96\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<ul>\n<li>Event Sourcing is an approach to store the state of event changes by using an Event Store. Event Store is a message broker acting as an event database. States are reconstructed by replaying the events from the Event Store.<\/li>\n<li>Choreography-based SAGA pattern can work well for small number of steps in a transaction (e.g. 2 to 4 steps). When number of steps in a transaction is increasing, it is difficult to track which services listen to which events.<\/li>\n<\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a622b68 elementor-widget elementor-widget-text-editor\" data-id=\"a622b68\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"d386\"><strong>Orchestration-based SAGA:\u00a0<\/strong>A coordinator service (Saga Execution Orchestrator, SEG) is responsible for sequencing transactions according to business logic. Orchestrator decides to which operation should be performed. If an operation fails, Orchestrator undo the previous steps. It is called as compensation operation. Compensations are the actions to apply when a failure happens to keep the system in consistent state.<\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0b2a17f elementor-widget elementor-widget-text-editor\" data-id=\"0b2a17f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<ul>\n<li>Undoing changes may not be possible already when data has been changed by a different transaction.<\/li>\n<li>Compensations must be\u00a0<strong>idempotent\u00a0<\/strong>because they might be called more than once within the retry mechanism.<\/li>\n<li>Compensations should be designed carefully.<\/li>\n<\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e67d000 elementor-widget elementor-widget-text-editor\" data-id=\"e67d000\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<blockquote class=\"wp-block-quote\">\n<p>There are some available frameworks to implement the Saga orchestration pattern e.g.\u00a0<a href=\"https:\/\/camunda.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Camunda<\/a>,\u00a0<a href=\"https:\/\/camel.apache.org\/components\/latest\/eips\/saga-eip.html\" target=\"_blank\" rel=\"noreferrer noopener\">Apache Camel<\/a>.<\/p>\n<\/blockquote>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c0ecf64 elementor-widget elementor-widget-text-editor\" data-id=\"c0ecf64\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"e021\"><strong>Benefits of SAGA<\/strong><\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4ed74fb elementor-widget elementor-widget-text-editor\" data-id=\"4ed74fb\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<ul>\n<li>Perform\u00a0<strong>non-blocking\u00a0<\/strong>operations running on local atomic transactions<\/li>\n<li>Offer\u00a0<strong>no deadlocks<\/strong>\u00a0between transactions<\/li>\n<li>Offer\u00a0<strong>no single point of failure<\/strong><\/li>\n<\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-61fb32f elementor-widget elementor-widget-text-editor\" data-id=\"61fb32f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"cc9d\"><strong>Drawbacks of SAGA<\/strong><\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-77e0870 elementor-widget elementor-widget-text-editor\" data-id=\"77e0870\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<ul>\n<li><strong>Eventual\u00a0<\/strong>data consistency<\/li>\n<li>Does not have\u00a0<strong>read isolation<\/strong>, needs extra effort (e.g. the user could see the operation being completed, but in a few second, it is cancelled due to a compensation transaction.)<\/li>\n<li>Difficult to debug, when participant service count is increased<\/li>\n<li>Increased development cost (actual service developments plus compensations service developments are required)<\/li>\n<li>Design is\u00a0<strong>complex<\/strong><\/li>\n<\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5b661ca elementor-widget elementor-widget-text-editor\" data-id=\"5b661ca\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<blockquote class=\"wp-block-quote\">\n<p>Data consistency between the distributed data stores can be extremely difficult to maintain. There needs to be a different mindset in design of the new applications.<\/p>\n<p>We can say that<strong>\u00a0responsibility for data consistency moves from database to application level.<\/strong><\/p>\n<\/blockquote>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-799fbb3 elementor-widget elementor-widget-heading\" data-id=\"799fbb3\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Which Solution to Choose<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4a32006 elementor-widget elementor-widget-text-editor\" data-id=\"4a32006\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"68bf\">The solution depends on the use case and consistency requirements.<\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3aa0d42 elementor-widget elementor-widget-text-editor\" data-id=\"3aa0d42\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"0c73\">In general, the following design considerations should be taken into account.<\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6a39d08 elementor-widget elementor-widget-text-editor\" data-id=\"6a39d08\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<ol>\n<li><strong>Avoid\u00a0<\/strong>using\u00a0<strong>distributed transactions<\/strong>\u00a0across microservices if possible. Working with distributed transactions brings more complex problems.<\/li>\n<li>Design your system that doesn\u2019t require distributed consistency as much as possible. To achieve this, identify\u00a0<strong>transaction boundaries<\/strong>\u00a0as following;<\/li>\n<\/ol>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9ad5c6f elementor-widget elementor-widget-text-editor\" data-id=\"9ad5c6f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<ul>\n<li>Identify the operations that have to work in same unit of work. Use strong consistency for this type of operations<\/li>\n<li>Identify the operations that can able to tolerate possible latencies in terms of consistency. Use eventual consistency for this type of operations<\/li>\n<\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4bc9189 elementor-widget elementor-widget-text-editor\" data-id=\"4bc9189\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"43bd\">3. Consider using\u00a0<strong>event-driven architecture<\/strong>\u00a0for asynchronous non-blocking service calls<\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8772c50 elementor-widget elementor-widget-text-editor\" data-id=\"8772c50\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"8630\">4. Design\u00a0<strong>fault-tolerant systems<\/strong>\u00a0by compensations and reconciliation processes to keep the system consistent<\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-2425b24 elementor-widget elementor-widget-text-editor\" data-id=\"2425b24\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"c756\">5. Eventual consistent patterns requires a\u00a0<strong>change in mindset<\/strong>\u00a0for design and development<\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7ba9c7e elementor-widget elementor-widget-heading\" data-id=\"7ba9c7e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Conclusion<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-931dbfc elementor-widget elementor-widget-text-editor\" data-id=\"931dbfc\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"59d1\">Microservices architecture has great features such as high availability, scalability, automation, autonomous teams etc. A number of changes in traditional methods are required to obtain maximum efficiency of the microservice architectural style. Data and consistency management is one of the topics that needs to be designed carefully.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-92acffd elementor-widget elementor-widget-text-editor\" data-id=\"92acffd\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"4745\">Have fun in your microservice journey.<\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5f62d22 elementor-widget elementor-widget-heading\" data-id=\"5f62d22\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">References<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5290850 elementor-widget elementor-widget-text-editor\" data-id=\"5290850\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<ul>\n<li>O\u2019Reilly, Monolith to Microservices by Sam Newman\u00a0<a href=\"https:\/\/www.oreilly.com\/library\/view\/monolith-to-microservices\/9781492047834\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.oreilly.com\/library\/view\/monolith-to-microservices\/9781492047834\/<\/a><\/li>\n<li>O\u2019Reilly, Migrating to Microservice Databases by Edson Yanaga\u00a0<a href=\"https:\/\/www.oreilly.com\/library\/view\/migrating-to-microservice\/9781492048824\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.oreilly.com\/library\/view\/migrating-to-microservice\/9781492048824\/<\/a><\/li>\n<li>Chris Richardson. Using Saga Patterns to Maintain Data Consistency in a Microservice Architecture.\u00a0<a href=\"https:\/\/www.youtube.com\/watch?v=YPbGW3Fnmbc\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.youtube.com\/watch?v=YPbGW3Fnmbc<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/architecture\/reference-architectures\/saga\/saga\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/docs.microsoft.com\/en-us\/azure\/architecture\/reference-architectures\/saga\/saga<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/architecture\/patterns\/compensating-transaction\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/docs.microsoft.com\/en-us\/azure\/architecture\/patterns\/compensating-transaction<\/a><\/li>\n<li><a href=\"https:\/\/blog.christianposta.com\/microservices\/the-hardest-part-about-microservices-data\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/blog.christianposta.com\/microservices\/the-hardest-part-about-microservices-data\/<\/a><\/li>\n<li><a href=\"https:\/\/www.baeldung.com\/transactions-across-microservices\" target=\"_blank\" rel=\"noreferrer noopener\" class=\"broken_link\">https:\/\/www.baeldung.com\/transactions-across-microservices<\/a><\/li>\n<\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Microservices architecture has great features such as high availability, scalability, automation, autonomous teams etc. A number of changes in traditional methods are required to obtain maximum efficiency of the microservice architectural style.<\/p>\n","protected":false},"author":1126,"featured_media":19302,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"content-type":"","footnotes":""},"categories":[187],"tags":[1553,1554,1436,1555],"ppma_author":[3768],"class_list":["post-22784","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bigdata-cloud","tag-data-consistency","tag-distributed-architecture","tag-microservices-architecture","tag-transaction-management"],"authors":[{"term_id":3768,"user_id":1126,"is_guest":0,"slug":"dilfuruz-kizilpinar","display_name":"Dilfuruz KIZILPINAR","avatar_url":"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2021\/05\/Dilfuruz-KIZILPINAR-150x150.jpeg","user_url":"http:\/\/www.garantiteknoloji.com.tr","last_name":"KIZILPINAR","first_name":"Dilfuruz","job_title":"","description":"Dilfuruz KIZILPINAR is Senior Solutions Architect at Garanti BBVA Technology, the developer of many technological firsts in the Turkish finance sector,"}],"_links":{"self":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts\/22784","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/users\/1126"}],"replies":[{"embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/comments?post=22784"}],"version-history":[{"count":13,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts\/22784\/revisions"}],"predecessor-version":[{"id":31283,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts\/22784\/revisions\/31283"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/media\/19302"}],"wp:attachment":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/media?parent=22784"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/categories?post=22784"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/tags?post=22784"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=22784"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}