Some days ago i was hosting an application on a server the thing that is different is that instead of providing mysql database on the 127.0.0.1 they are providing the mysql at 127.6.122.2. The question is that can't it affect the performance of the application ?
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a
member of our community. Consider creating an
account or login.
its a matter of network location or in other sense IP. You properly link SQL and Application and there won't be any issue with the performance. changing the location doesn't change the quality.
@#-Link-Snipped-# it matters if you change your database location from localhost to some other. It will degrade your performance as it have to connect to database on some specific ip(some extra work) instead of connecting at local database.
It depends upon server speed i.e how much time it takes to execute a query, I don't think location has anything to do with performance, I have seen many people host their database on another server instead on localhost
@#-Link-Snipped-# can't we say that it will take some time(network time) to establish connection to your database. While on the other side we are taking the database locally(no network time).
ok,
as far as my knowledge about networking goes, complete range of 127.x.x.x ie 127.0.0.0/8 is all reserved for loopback communications, with 127.0.0.1 is default address. When you use 127.x.x.x as addresses, the protocol stack is informed that the data packet should not go beyond the local machine and is intended for some address within the machine .please check if you are listening on the port you had mentioned. By theory wise- it should not make a difference.
@#-Link-Snipped-# Thanks i got what i want to know.
@#-Link-Snipped-# tanks goyal for taking the part of discussion. Will come back to you again in case the DB is on different server 😁