I have a question about managing subdomains and how to best configure DNS in an architecture where the subdomains are dispatched on several servers I don't even know if it's possible so requests for clarification
DNS configuration :
* A 51.51.51.1
@ A 51.51.51.1
Domain: example.com
Sub-domain : sub1.example.com
There are 2 servers: 51.51.51.1, 51.51.51.2
How can we configure Apache on the 51.51.51.1 server so that a request like http://sub1.example.com is redirected to the 51.51.51.2 server, of course keeping the same source URL in the browser ?
Do we have to add a registration in the DNS for the sub-domain sub1 or can we do without and only modify the Apache configuration on the server 51.51.51.1 ?
Which is more effective ?