-2

I have a quick question - basic one. In AWS, does placing application instances in the same subnet with Database improve the performance of application and database request and response?

Thank you. Amanuel

This is just a general question that challenged me. I know in the physical world since we are removing the routing layer overhead and computes are interacting in layer 2 I can say that it can be faster. But not sure how it works on Amazon VPC.

  • The network latency will be lower, so yes they would perform better in theory. – Mark B May 30 '23 at 19:49
  • Hi Mark, Thank you for the reply. I looked it up and it turned out to be different in Cloud (for software defined devices). I am posting answer below for your info. – Amanuel Yohannes Jun 07 '23 at 20:23
  • Generally different subnets are created for different availability zones. Different availability zones are generally in different locations (different data centers). If they are in the same subnet, that would mean they are in the same physical data center, which would definitely be faster than if they are in completely different data centers. – Mark B Jun 07 '23 at 20:25

1 Answers1

0

In the physical world if we place 2 IP devices in the same subnet, they will be communicating on Layer 2 (ARP & MAC Address) and we are removing the layer 3 (IP) part of the communication. However in Amazon VPC, we use software defined network devices (Mapping Service) hence there is no impact on performance placing application and database in the same or different subnets. But in general we should remember to apply best practices when we deploy resources in terms of AZ for high availability and subnet segmentation for management and security.

Here is a re:Invent link for more details (19min:15sec) https://www.youtube.com/watch?app=desktop&v=Zd5hsL-JNY4