{"id":1212,"date":"2021-04-30T07:00:16","date_gmt":"2021-04-29T21:00:16","guid":{"rendered":"http:\/\/www.moneystock.net\/wp_e\/?p=1212"},"modified":"2021-04-29T22:03:54","modified_gmt":"2021-04-29T12:03:54","slug":"beyond-microservices-in-a-one-page","status":"publish","type":"post","link":"https:\/\/moneystock.net\/wp_e\/2021\/04\/30\/beyond-microservices-in-a-one-page\/","title":{"rendered":"Beyond Microservices in a one page"},"content":{"rendered":"<p><strong>Problems<\/strong><\/p>\n<ol>\n<li>Clients know too much: Auth, Encryption, etc.<\/li>\n<li>Hard to change a microservice -&gt; Don&#8217;t know who&#8217;s using it. Hard to add a new microservice -&gt; No one may use it. Being political.<\/li>\n<li>Responsibility for the failure in a microservice. What happened when a microservice fails.<\/li>\n<li>REST is slow<\/li>\n<\/ol>\n<p><strong>Solutions &#8211; Useful Architectures<\/strong><\/p>\n<ol>\n<li>API Gateway\n<ol>\n<li>Provides: Auth, Routing,\u00a0Rate Limiting, and Logging and analytics.<\/li>\n<li>It can be a bottleneck if all internal services access the API gateway. =&gt; Anti-Pattern<\/li>\n<li>Service Mesh. Side-car. Shared library.\n<ol>\n<li>Work as a proxy(service discovery, routing).<\/li>\n<li>Control re-try pattern. e.g. circuit-breaker. Too much retry causes a problem.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<\/li>\n<li>Event-Driven\n<ol>\n<li>Broadcast -&gt; Subscribe. Being independent of the other services.<\/li>\n<\/ol>\n<\/li>\n<li>DB for each microservice\n<ol>\n<li>local DB can provide local state for each Microservice, which allows independence.<\/li>\n<li>DB can be a small, cloud-based key-value DB.<\/li>\n<\/ol>\n<\/li>\n<li>Schema\n<ol>\n<li>Very important to keep the consistent schema (contracts) among services.<\/li>\n<li>Can register all schema in the schema registry, which all microservices will share.<\/li>\n<\/ol>\n<\/li>\n<li>Serverless\n<ol>\n<li>Can have state by storing in cloud DB or storage.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p><strong>Still missing<\/strong><\/p>\n<ol>\n<li>Durable functions -&gt; Azure functions?<\/li>\n<li>Triggers and data from stores to functions -&gt; Maybe Azure event grid is the answer for this.<\/li>\n<li>Unified view of the current state -&gt; Hard to check what&#8217;s happening long the workflow of the entire system.<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>Reference: https:\/\/www.youtube.com\/watch?v=H0LUi51aCP8<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Problems Clients know too much: Auth, Encryption, etc. Hard to change a microservice -&gt; Don&#8217;t know who&#8217;s using it. Hard to add a new microservice -&gt; No one may use it. Being political. Responsibility for the failure in a microservice. What happened when a microservice fails. REST is slow Solutions &#8211; Useful Architectures API Gateway&hellip; <a class=\"more-link\" href=\"https:\/\/moneystock.net\/wp_e\/2021\/04\/30\/beyond-microservices-in-a-one-page\/\">Continue reading <span class=\"screen-reader-text\">Beyond Microservices in a one page<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[606,586],"tags":[610,616,612,608,614],"class_list":["post-1212","post","type-post","status-publish","format-standard","hentry","category-architecture","category-azure","tag-api-gateway","tag-azure-functions","tag-event-driven","tag-microservice","tag-serverless","entry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/moneystock.net\/wp_e\/wp-json\/wp\/v2\/posts\/1212","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/moneystock.net\/wp_e\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/moneystock.net\/wp_e\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/moneystock.net\/wp_e\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/moneystock.net\/wp_e\/wp-json\/wp\/v2\/comments?post=1212"}],"version-history":[{"count":2,"href":"https:\/\/moneystock.net\/wp_e\/wp-json\/wp\/v2\/posts\/1212\/revisions"}],"predecessor-version":[{"id":1214,"href":"https:\/\/moneystock.net\/wp_e\/wp-json\/wp\/v2\/posts\/1212\/revisions\/1214"}],"wp:attachment":[{"href":"https:\/\/moneystock.net\/wp_e\/wp-json\/wp\/v2\/media?parent=1212"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/moneystock.net\/wp_e\/wp-json\/wp\/v2\/categories?post=1212"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/moneystock.net\/wp_e\/wp-json\/wp\/v2\/tags?post=1212"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}