<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Filipe Costa</title>
    <description>The latest articles on DEV Community by Filipe Costa (@fidsouza).</description>
    <link>https://dev.to/fidsouza</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1600920%2F4574816c-37a5-4b86-9c1a-79302b1aec6b.jpeg</url>
      <title>DEV Community: Filipe Costa</title>
      <link>https://dev.to/fidsouza</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/fidsouza"/>
    <language>en</language>
    <item>
      <title>How to start with micro services ?</title>
      <dc:creator>Filipe Costa</dc:creator>
      <pubDate>Sat, 04 Jan 2025 10:52:07 +0000</pubDate>
      <link>https://dev.to/fidsouza/how-to-start-with-micro-services--j22</link>
      <guid>https://dev.to/fidsouza/how-to-start-with-micro-services--j22</guid>
      <description>&lt;p&gt;When are the best moment to start with distributed system ? &lt;br&gt;
When i have decide about decouple my system in a distributed system ? &lt;/p&gt;

&lt;h2&gt;
  
  
  Our Case
&lt;/h2&gt;

&lt;p&gt;Imagine a bakery where have a one baker, imagine after now our orders increase a lot and his baker can't make breads for everyone, what is your better way ? &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F469yhq3uhsl9vdtus8e7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F469yhq3uhsl9vdtus8e7.png" alt="Image description" width="599" height="607"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  When the distributed system are important ?
&lt;/h3&gt;

&lt;p&gt;our can pay more money for this baker to him to make more breads and working more hours to attending our clients, yes ? &lt;/p&gt;

&lt;p&gt;probably our baker can achieve our goals , to attending more clients , but we have a some problems with this approach. &lt;/p&gt;

&lt;p&gt;some problemas we can have &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;our baker might get sick&lt;/li&gt;
&lt;li&gt;our baker may resign&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;if any this situations happen , all our clients not can have breads , this is called single point of failure.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8kmhp3lnrb6m4jobl9bi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8kmhp3lnrb6m4jobl9bi.png" alt="Image description" width="616" height="605"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  How the moment to start a micro services structure ?
&lt;/h3&gt;

&lt;p&gt;I believe when we have a lot of orders(requests) and our system that's so important to many clients and a single point of failure can destroy our company. &lt;/p&gt;

&lt;h3&gt;
  
  
  first step
&lt;/h3&gt;

&lt;p&gt;Our baker probably make a do a lot of things, made  breads , sweet breads, pizzas, manager delivery , charge clients, how many responsibilities to this baker , no ? &lt;/p&gt;

&lt;p&gt;the first step for me, we can choose the main responsibilities for this baker . &lt;/p&gt;

&lt;p&gt;for our context, the main responsibilities are make breads and sweet breads. &lt;/p&gt;

&lt;p&gt;if you pay attention on our problem , our bakery have a lot of responsabilities, the first step problem is a remove all responsabilities that not are to a baker job, like charge money, manager delivery system ant many other things. &lt;/p&gt;

&lt;h3&gt;
  
  
  our first service
&lt;/h3&gt;

&lt;p&gt;we need a new worker , his name is gateway , this worker are distributed the orders in our bakery . &lt;/p&gt;

&lt;p&gt;then when a new customer to go our bakery our customers talk first with our worker gateway and gateway distruted the orders in our bakerey. &lt;/p&gt;

&lt;h3&gt;
  
  
  second service
&lt;/h3&gt;

&lt;p&gt;our first service are called kitchen , kitchen are responsibilities to do breads, sweet breads, pizzas and all other things related like food. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F72fbol0toq47fjblpcpv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F72fbol0toq47fjblpcpv.png" alt="Image description" width="677" height="585"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  third service
&lt;/h3&gt;

&lt;p&gt;another responsibility that we removed from our only baker is manager delivery , when send a ready order , manager a transit deliver and many things about delivery system in a bakery shop. &lt;/p&gt;

&lt;h3&gt;
  
  
  Fourth Service
&lt;/h3&gt;

&lt;p&gt;We removed another responsibility from our baker: handling money. It’s very difficult to bake bread while also managing financial reports and taking care of cash transactions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Final Structure
&lt;/h3&gt;

&lt;p&gt;Why is this our final structure so important? Our primary goal was to eliminate a single point of failure. If our baker gets sick at any point, it’s no longer a problem. We can simply hire another baker to keep things running smoothly.&lt;/p&gt;

&lt;p&gt;Another issue we addressed was reducing the responsibilities of our sole baker. Now, we can easily improve our bakery by scaling the team. Need more bakers? No problem, we hire additional bakers. Too many deliveries? That’s fine, we can hire more people to manage addresses.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzm564xm1mrwdthntjkl5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzm564xm1mrwdthntjkl5.png" alt="Image description" width="673" height="494"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the first part of our article. Comment below if you’d like to see part 2!&lt;/p&gt;

</description>
      <category>microservices</category>
      <category>architecture</category>
      <category>designsystem</category>
    </item>
    <item>
      <title>Vertical or Horizontal Scale?</title>
      <dc:creator>Filipe Costa</dc:creator>
      <pubDate>Mon, 10 Jun 2024 02:10:06 +0000</pubDate>
      <link>https://dev.to/fidsouza/vertical-or-horizontal-scale-1dje</link>
      <guid>https://dev.to/fidsouza/vertical-or-horizontal-scale-1dje</guid>
      <description>&lt;h2&gt;
  
  
  System Design
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Horizontal Scaling or Vertical Scaling?
&lt;/h3&gt;

&lt;p&gt;Hi, this is my first article in English, so I apologize for any mistakes. I'm trying to improve my English each day. In this article, I will explain some basic principles of system design for beginners.&lt;/p&gt;

&lt;h3&gt;
  
  
  Scenario
&lt;/h3&gt;

&lt;p&gt;Imagine that you have built software and an API. Suddenly, you get more and more users, and your application starts experiencing timeouts. You need to increase the capacity of your server. &lt;/p&gt;

&lt;p&gt;What is the best way to scale your server?&lt;/p&gt;

&lt;h3&gt;
  
  
  Vertical Scaling
&lt;/h3&gt;

&lt;p&gt;Vertical scaling involves upgrading a single machine with more resources—such as memory, processor, and disk space—instead of adding more machines.&lt;/p&gt;

&lt;h3&gt;
  
  
  Horizontal Scaling
&lt;/h3&gt;

&lt;p&gt;Horizontal scaling involves adding more machines to your infrastructure, increasing the number of servers rather than the resources of a single server.&lt;/p&gt;

&lt;h3&gt;
  
  
  Which is the Best Choice?
&lt;/h3&gt;

&lt;p&gt;It depends on various factors. Below are some good and bad points of each design:&lt;/p&gt;

&lt;h4&gt;
  
  
  Vertical Scaling
&lt;/h4&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Good Points&lt;/th&gt;
&lt;th&gt;Bad Points&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Consistent data&lt;/td&gt;
&lt;td&gt;Single point of failure&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Single point of process&lt;/td&gt;
&lt;td&gt;Hardware limits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Small infrastructure (no need for load balancer)&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h4&gt;
  
  
  Horizontal Scaling
&lt;/h4&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Good Points&lt;/th&gt;
&lt;th&gt;Bad Points&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Scales well&lt;/td&gt;
&lt;td&gt;Potential data inconsistency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Resilient&lt;/td&gt;
&lt;td&gt;Many network calls&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Good for increasing users&lt;/td&gt;
&lt;td&gt;More expensive to maintain&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;Larger infrastructure&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;As we can see, there are many good and bad points for each design. Horizontal scaling tends to have more complexity and costs but can handle more users and provide better resilience. &lt;/p&gt;

&lt;p&gt;Key questions to consider:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Is data consistency very important to you?&lt;/li&gt;
&lt;li&gt;Can a single point of failure destroy your company?&lt;/li&gt;
&lt;li&gt;Are your users critical?&lt;/li&gt;
&lt;li&gt;Does your company have a perspective to increase users?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These considerations can help you choose the best option. Normally, in early stages of a company, vertical scaling is the best way. However, at some point, a single machine might not be enough to support your growth.&lt;/p&gt;

&lt;p&gt;Unfortunately, there is no definitive answer to these questions—it depends on your specific situation and moment.&lt;/p&gt;

</description>
      <category>systemdesign</category>
      <category>designsystem</category>
    </item>
  </channel>
</rss>
