{"id":21,"date":"2020-05-14T15:51:00","date_gmt":"2020-05-14T15:51:00","guid":{"rendered":""},"modified":"2021-09-23T19:34:47","modified_gmt":"2021-09-23T17:34:47","slug":"think-before-going-microservices","status":"publish","type":"post","link":"http:\/\/panahy.nl\/index.php\/2020\/05\/14\/think-before-going-microservices\/","title":{"rendered":"Think before going Microservices"},"content":{"rendered":"<div style=\"-webkit-box-align: baseline; align-items: baseline; background-color: #deebff; border-radius: 3px; border: none; clear: both; color: #172b4d; display: flex; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', Ubuntu, 'Droid Sans', 'Helvetica Neue', sans-serif; font-size: 16px; margin: 0.75rem 0px 0px; min-width: 48px; padding: 8px; white-space: pre-wrap; word-break: break-word;\" data-panel-type=\"info\">\n<div style=\"flex: 1 0 0px; margin: 1px 0px; padding: 0px;\">\n<p style=\"font-size: 1em; letter-spacing: -0.005em; line-height: 1.714; margin: 0px; padding: 0px;\" data-renderer-start-pos=\"2\"><span style=\"letter-spacing: -0.08px;\">The goal of microservices is to sufficiently decompose the application in order to <\/span>facilitate agile application development and deployment.<\/p>\n<\/div>\n<\/div>\n<p style=\"background-color: white; color: #172b4d; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', Ubuntu, 'Droid Sans', 'Helvetica Neue', sans-serif; font-size: 16px; letter-spacing: -0.005em; line-height: 1.714; margin: 0.75rem 0px 0px; padding: 0px; white-space: pre-wrap;\" data-renderer-start-pos=\"144\">The following is based on the book <em data-renderer-mark=\"true\">Microservices from Design to Deployment<\/em> from NGINX. My goal is to know the difficaulties that this inevitable is bringing with in order to be prepared for.<\/p>\n<h2 style=\"background-color: white; border-bottom-color: #cccccc; color: #172b4d; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', Ubuntu, 'Droid Sans', 'Helvetica Neue', sans-serif; font-size: 1.42857em; font-weight: 500; letter-spacing: -0.008em; line-height: 1.2; margin: 1.8em 0px 0px; padding: 0px; white-space: pre-wrap;\" data-renderer-start-pos=\"336\">The Drawbacks of Microservices<button style=\"color: #42526e; cursor: pointer; display: inline; font-family: inherit; opacity: 0; outline: none; padding-left: 0px; padding-right: 0px; right: 0px; transform: translate(-8px, 0px); transition: opacity 0.2s ease 0s, transform 0.2s ease 0s; border: initial none initial;\"><\/button><\/h2>\n<ol>\n<li style=\"font-size: 1em; letter-spacing: -0.005em; line-height: 1.714;\" data-renderer-start-pos=\"370\">One drawback is the <strong data-renderer-mark=\"true\">name <\/strong>itself. The term microservice places excessive emphasis on service size. While small services are preferable, it\u2019s important to remember that small services are a means to an end, and not the primary goal.<\/li>\n<li style=\"margin-top: 4px;\">\n<p style=\"font-size: 1em; letter-spacing: -0.005em; line-height: 1.714; margin: 0px; padding: 0px;\" data-renderer-start-pos=\"605\">Another major drawback of microservices is the <strong data-renderer-mark=\"true\">complexity <\/strong>that arises from the fact that a microservices application is a distributed system. Developers need to choose and implement an <strong data-renderer-mark=\"true\">inter-process communication<\/strong> mechanism based on either messaging or RPC. Moreover, they must also write code to handle partial failure, since the destination of a request might be slow or unavailable.<\/p>\n<\/li>\n<li style=\"margin-top: 4px;\">\n<p style=\"font-size: 1em; letter-spacing: -0.005em; line-height: 1.714; margin: 0px; padding: 0px;\" data-renderer-start-pos=\"994\">Another challenge with microservices is the <strong data-renderer-mark=\"true\">partitioned database architecture<\/strong>. Using distributed transactions is usually not an option, and not only because of the CAP theorem. They simply are not supported by many of today\u2019s highly scalable NoSQL databases and messaging brokers. You end up having to use an eventual consistency-based approach, which is more challenging for developers.<\/p>\n<\/li>\n<li style=\"margin-top: 4px;\">\n<p style=\"font-size: 1em; letter-spacing: -0.005em; line-height: 1.714; margin: 0px; padding: 0px;\" data-renderer-start-pos=\"1386\"><strong data-renderer-mark=\"true\">Testing <\/strong>a microservices application is also much more complex. A simple test class for a service<br \/>\nwould need to launch that service and any services that it depends upon, or at least configure stubs for those services.<\/p>\n<\/li>\n<li style=\"margin-top: 4px;\">\n<p style=\"font-size: 1em; letter-spacing: -0.005em; line-height: 1.714; margin: 0px; padding: 0px;\" data-renderer-start-pos=\"1608\">Another major challenge with the Microservices Architecture pattern is implementing<br \/>\n<strong data-renderer-mark=\"true\">changes that span multiple services<\/strong>. Fortunately, most changes typically impact only<br \/>\none service; multi-service changes that require coordination are relatively rare.<\/p>\n<\/li>\n<li style=\"margin-top: 4px;\">\n<p style=\"font-size: 1em; letter-spacing: -0.005em; line-height: 1.714; margin: 0px; padding: 0px;\" data-renderer-start-pos=\"1863\"><strong data-renderer-mark=\"true\">Deploying <\/strong>a microservices-based application is also much more complex.<\/p>\n<\/li>\n<li style=\"margin-top: 4px;\">\n<p style=\"font-size: 1em; letter-spacing: -0.005em; line-height: 1.714; margin: 0px; padding: 0px;\" data-renderer-start-pos=\"1939\">Each service will have <strong data-renderer-mark=\"true\">multiple runtime instances<\/strong>. That\u2019s many more moving parts that<br \/>\nneed to be configured, deployed, scaled, and monitored. In addition, you will also need to<br \/>\nimplement a service discovery mechanism that enables a service to discover the locations<br \/>\n(hosts and ports) of any other services it needs to communicate with.<\/p>\n<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>The goal of microservices is to sufficiently decompose the application in order to facilitate agile application development and deployment. The following is based on the book Microservices from Design to Deployment from NGINX. My goal is to know the difficaulties that this inevitable is bringing with in order to be prepared for. The Drawbacks of &hellip; <a href=\"http:\/\/panahy.nl\/index.php\/2020\/05\/14\/think-before-going-microservices\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Think before going Microservices&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"post-thumbnail":false},"uagb_author_info":{"display_name":"Pouya Panahy","author_link":"http:\/\/panahy.nl\/index.php\/author\/pouya\/"},"uagb_comment_info":0,"uagb_excerpt":"The goal of microservices is to sufficiently decompose the application in order to facilitate agile application development and deployment. The following is based on the book Microservices from Design to Deployment from NGINX. My goal is to know the difficaulties that this inevitable is bringing with in order to be prepared for. The Drawbacks of&hellip;","_links":{"self":[{"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/posts\/21"}],"collection":[{"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/comments?post=21"}],"version-history":[{"count":2,"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/posts\/21\/revisions"}],"predecessor-version":[{"id":193,"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/posts\/21\/revisions\/193"}],"wp:attachment":[{"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/media?parent=21"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/categories?post=21"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/tags?post=21"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}