I'm looking into developing a web application hosted on Amazon Web Services and I have a question regarding it's architecture.
Looking at the diagram below from Amazon, they've got 3 layers; a web server serving users via HTTP, an application server processing business logic, and a database server. This is perfect for our use and the separation of web and application logic is great, however I have a question regarding the communication between the layers.
The app's code is going to be written in PHP. The communication between the application server and the database server can be done by PHP's mysqli extension (to the host db server via port 3306 by default). This is fine, however I'm unsure how communication would be made between the web server and the application server during a user's HTTP request, and what the best way of doing it is.
I've read up about XML/RPC, or possibly JSON/RPC, but is this the right thing that I'm looking for? Or is communication between different PHP server layers usually done another way?
Any advice would be greatly appreciated.