At my office, we have a php server and also a postgresql server. The php server querying local postgresql server is fast, but recently we are migrating the db to AWS RDS.