Please have a look on the below docs for clarity:
-Do rate helpful posts.
Which one is better between layer 2 and layer 3 connection ? Why corporates are willing to take layer 2 connectivity ?
Both are having advatanges based on architecure requirement, if you want separet Layer 3 DC's then you are having separate ip subnets in both the DC and application are running in active-active mode for efficient use of resources.
But the session persistency cant be that efficent to manage in Layer 3 DC's and cluster extension in some vendors are not that sucessfull.
With Layer 2 design , You can have VLAN extended between DC's for cluster extension and efficient use of High availabilty of application in case of DR.
Hope it helps..
Rate if it Helps
The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.
In no event shall Author be liable for any damages wha2tsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.
Which is "better" is a "it depends" answer, but corporations are willing to use L2 because they may find L2 less expensive (often they are an Ethernet hand-off [today, so might be a L3 hand-off]) or they might find it easier to use L2 to tie together data centers where they want to extend VLANs between the two.