<?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: Ilango</title>
    <description>The latest articles on DEV Community by Ilango (@ilango).</description>
    <link>https://dev.to/ilango</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%2F36136%2Fc994b6f8-3995-40fe-8c74-b0d457c73489.jpg</url>
      <title>DEV Community: Ilango</title>
      <link>https://dev.to/ilango</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ilango"/>
    <language>en</language>
    <item>
      <title>Production-grade AWS architecture [Part 4]: Networking</title>
      <dc:creator>Ilango</dc:creator>
      <pubDate>Mon, 04 May 2020 14:58:17 +0000</pubDate>
      <link>https://dev.to/ilango/production-grade-aws-architecture-part-4-networking-2f48</link>
      <guid>https://dev.to/ilango/production-grade-aws-architecture-part-4-networking-2f48</guid>
      <description>&lt;p&gt;Networking in AWS is such a huge topic that cannot be explained in one blog post. I'm also not going to cover every service under it's roof.  Networking in AWS spans multiple services. Each has its own set of features that provides an incredible level of flexibility for your needs. This flexibility exists to support any requirements that you might have. &lt;/p&gt;

&lt;p&gt;There is a problem with this flexibility though. It's easy to make mistakes by misconfiguring your network. These mistakes will cause things to not work or lead to security and compliance issues. Knowing this, AWS puts forth what's called a &lt;a href="https://aws.amazon.com/compliance/shared-responsibility-model/"&gt;Shared Responsibility Model&lt;/a&gt;. The responsibility of security and compliance of your web applications and services is shared between AWS and you. AWS takes care of security "of" the cloud — data centers, hardware, software, networking. You take care of security "in" the cloud — data, encryption, operating systems, firewalls etc. &lt;/p&gt;

&lt;h3&gt;
  
  
  Regions and Availability Zones
&lt;/h3&gt;

&lt;p&gt;Amazon Web Services is built on top of a global network of datacenters. These datacenters are segmented on two levels — regions and availability zones. Regions are geographic locations where a cluster of datacenters are located. There are 24 regions as of this writing. Availability zones (AZ) are physically isolated datacenters in the same region. There are usually 2 or 3 AZs per region with a global total of 76. AZs within a region are connected by low-latency network connections. &lt;a href="https://aws.amazon.com/about-aws/global-infrastructure/"&gt;This global infrastructure&lt;/a&gt; is the backbone that provides scalability, reliability and performance. &lt;/p&gt;

&lt;h3&gt;
  
  
  Why are these details important?
&lt;/h3&gt;

&lt;p&gt;Depending on your use-case, you might want to run your services in multiple AZs and even multiple regions. By being available on multiple regions and AZs, you can provide higher availability for your customers. This could also be for handling failovers. Or for reducing latency by being available close to your customers' physical location. So when you're starting on AWS, you'll have to pick region(s) based on your requirements. &lt;/p&gt;

&lt;p&gt;You should also know that new services will be made available only to a few regions first. For example, EC2 is available in all regions because it's one of the oldest. AWS Comprehend is not available everywhere because it's relatively new. It's a good idea to check if the service you want to use is available in the region your deploying. Check out the &lt;a href="https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/"&gt;region table&lt;/a&gt; to see which services are available in the regions you want.&lt;/p&gt;

&lt;h3&gt;
  
  
  Networking services on AWS
&lt;/h3&gt;

&lt;p&gt;The following are the networking services available on AWS:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Virtual Private Cloud (VPC)&lt;/li&gt;
&lt;li&gt;Elastic Load Balancer (ELB)&lt;/li&gt;
&lt;li&gt;Route53 (DNS)&lt;/li&gt;
&lt;li&gt;API Gateway&lt;/li&gt;
&lt;li&gt;CloudFront (CDN)&lt;/li&gt;
&lt;li&gt;DirectConnect&lt;/li&gt;
&lt;li&gt;PrivateLink&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Please note that each of these services has a lot of functionality to cover every use case under the sun. I won't be explaining all of these services in this post (or any future post with one or two exceptions). AWS documentation is pretty good for explaining what these services are. For most use cases, you'll be using 1 through 5.&lt;/p&gt;

&lt;h3&gt;
  
  
  A note on VPCs
&lt;/h3&gt;

&lt;p&gt;VPCs are such an important part of your infrastructure. A VPC is a logically isolated network that is built on top of the AWS global network. Each VPC is self-contained and unless configured to do so, cannot communicate with the public internet. VPCs give you a lot of controls to configure a network for your needs. Internet Gateways, NAT, ingress and egress controls, access control lists and more. A lot of compute services on AWS — EC2, Lambda and ELB — heavily relies on VPCs to function.&lt;/p&gt;

&lt;p&gt;For this reason, AWS automatically creates a VPC in every region when you create your account. That said, you should never use the default VPC in a production environment. This is because, the default VPC is set up to allow you to quickly provision resources. They are not designed with a production environment in mind. &lt;/p&gt;

&lt;p&gt;When setting up your production infrastructure, you should setup and configure a separate VPC. In fact, you should setup a VPC for each of your development environments — dev, staging and production. How you setup your VPC depends on your requirements but there are a couple of architectures that can get you started.&lt;/p&gt;

&lt;p&gt;We will go in-depth into these architectures in the next post. &lt;/p&gt;




&lt;p&gt;Previous posts:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://ilango.xyz/production-grade-aws-architecture-part-1-services/"&gt;Production-grade AWS architecture, Part 1: Services&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ilango.xyz/production-grade-aws-architecture-part-2-first-steps/"&gt;Production-grade AWS architecture, Part 2: First Steps&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ilango.xyz/production-grade-aws-architectures-part-3-monolithic-vs-microservices/"&gt;Production-grade AWS architectures, Part 3: Monoliths vs Microservices&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
    </item>
    <item>
      <title>Understanding software entropy</title>
      <dc:creator>Ilango</dc:creator>
      <pubDate>Thu, 30 Apr 2020 01:47:03 +0000</pubDate>
      <link>https://dev.to/ilango/understanding-software-entropy-26d</link>
      <guid>https://dev.to/ilango/understanding-software-entropy-26d</guid>
      <description>&lt;p&gt;Do you know what I think the coolest law of physics is? It's the second law of thermodynamics.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The total entropy of an isolated system can never decrease over time, and is constant if and only if all processes are reversible.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Put in normal person words, disorder will always increase over time unless you do something about it. The laws of thermodynamics talk about heat and how it affects matter. But when it comes to the second law, entropy specifically, it's universal. &lt;/p&gt;

&lt;p&gt;Think about all the problems you've faced in life. They always seem to just show up but it takes effort to solve those problems. If you're a super lazy person like me, you know that when you're lazy for too long, life just becomes shit.&lt;/p&gt;

&lt;p&gt;This is why I think that entropy and the second law of thermodynamics is the coolest law of physics there is. Because it's not just a law. It's a mental model for solving problems. It also applies to software development. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Imagine that you take a box of puzzle pieces and dump them out on a  table. In theory, it is possible for the pieces to fall perfectly into  place and create a completed puzzle when you dump them out of the box.  But in reality, that never happens. Why? Quite simply, because the odds are overwhelmingly against it.&lt;br&gt;
— James Clear&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Imagine you're starting a software project. In the beginning you want to get features out the door as quickly as possible. You're not thinking about clean coding practices, or have future maintenance and tech debt in mind. You want to get to generating revenue fast. At this stage, your entropy is low because the system is new. Facebook even had a phrase that became quite popular:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Move fast and break things.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let me tell you that there is nothing wrong with this mindset. In fact, it's required for your business to get off the ground. Because your users won't care about your "zero tech debt" (is that even a thing?) or that you've obsessively organized your codebase. Your software has to work.&lt;/p&gt;

&lt;p&gt;But you won't stay in this position forever. There will come a time when you have to start thinking about code quality and start clearing out your tech debt. So why is entropy relevant here? Because as time goes on, the disorder in your codebase(s) will start to increase. This will happen when you've added features, bug and hot fixes and when more team members are contributing to the codebase. &lt;/p&gt;

&lt;h3&gt;
  
  
  What does entropy in code look like?
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZwQHwrHE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1588179474565/1Add5WLug.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZwQHwrHE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1588179474565/1Add5WLug.png" alt="119-code-entropy.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When the entropy in your code is high, you'll start seeing effects of it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Making changes to your system gets harder. This happens so slowly that you will never see it coming. Eventually, new features and bug fixes will break existing ones. It starts off with one hot fix here and a workaround there. It's even possible to snowball this effect — more and more "hackish" code to fix existing ones.&lt;/li&gt;
&lt;li&gt;Your team will start developing "information silos". There will be specific people with absolute knowledge of parts of the system and changing it will need "their expert opinion". It'll be harder for the team to contribute because they won't know the nuances yet.&lt;/li&gt;
&lt;li&gt;The software breaks in unexpected places. Fixing simple issues takes valuable developer time. Because, unlike other types of engineering, software is a series of logical assertions. Once these assertions starts breaking, it'll lead to multiple interpretations of how the system functions. Some of these interpretations might even be incomplete because you don't see the full picture.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;And as the law states, entropy can only increase. You can never decrease entropy in a system. Note that this is different from tech debt. You can reduce tech debt but you can never reduce entropy. With effort you can keep it constant or decrease it's growth.&lt;/p&gt;

&lt;h3&gt;
  
  
  How to mitigate entropy?
&lt;/h3&gt;

&lt;p&gt;There are three ways that I know of. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A well defined code review process. When your team members are reviewing each other's code, there are lesser chances for your assertions to break. It'll be easier for others to interpret your code the way you intended. How does this look in practice? You're having healthy discussions with your reviewers in a pull request. It's important to do this publicly so others can see it and can act as a reference in the future.&lt;/li&gt;
&lt;li&gt;Setting aside time for iterations and refactoring. This is easier said than done, however. Refactoring takes time and effort and will have no business impact in the short term, whatsoever. This is the reason development teams usually don't spend time refactoring. It's harder to sell the impact when effort doesn't affect revenue.&lt;/li&gt;
&lt;li&gt;This is by far the hardest. It takes a change in behaviour and thinking. Being mindful of your assertions and how they could be misinterpreted goes a long way. Shaping the constraints of a feature and clearly defining them also reduces the chances of misinterpretation. This will slow down development a bit, but you're saving yourself and your team future headaches. And in the long run, it actually saves time. &lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;Entropy is not something we actively think about during development. But it plays a major role in how you build software. Although you can't decrease entropy, it's possible to reduce the growth and it's effects. What process do you follow at work to mitigate entropy? Is there a process you follow that I should know about? &lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
