How do I encapsulate the application server from the web and database servers?

Posted by SNyamathi on Server Fault See other posts from Server Fault or by SNyamathi
Published on 2012-09-23T20:05:44Z Indexed on 2012/09/23 21:39 UTC
Read the original article Hit count: 225

So I've been doing some reading and it seems like the best practice would be to have separate database, application, and web servers. There are a few things that I've failed to understand - please feel free to recommend any reading materials that would address these topics.


Database (assume MySQL) Application server communication:

  • Does the database server do any sort of checks on the SQL commands sent / returned, or is it just a "dumb pipe" that responds to SQL commands by spitting back data?

Application server (assume Tomcat) Web Server

Almost the reverse here, is it the web server that is more of a pipe to the internet that forwards requests to the application server and spits back responses? I'm not wording this well, but I'm trying to ask - is it the application server that is responsible for validating data received by from requests? ex:

  • Parsing POSTs
  • Validating user logins
  • Encrypting decrypting data

Furthermore, how do these two servers communicate? I'm trying to keep things as flexible as possible here, so while I could write a web server in Java and use Java to communicate between the web and app server, that doesn't sound very modular. What if I want to use Python or some other language to replace the web server later on? What if I want to make a non-web facing application used in house written in C++ or something.


© Server Fault or respective owner

Related posts about webserver

Related posts about database