Do application and Database perform better if they are placed in the same subnet?

227 Views Asked by At

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.

1

There are 1 best solutions below

0
Amanuel Yohannes On

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