Build 3 Tier Application With Firewall Between Them

I have to develop an application that should be divided in 3 tier (presentation layer, application layer and database layer).

Every layer should communicate to another through a firewall, every layer should be hosted in different server.

how can it be implemented with yii framework??

The concept behind this looks horribly unfit for a webapp, as application and presentation are coupled pretty tightly. Is this an absolutely required feature?

There is a second option, if this topology (3 tier) is not accomplish:

"Where vendor’s product solution architectures only support a 2-tier rather than 3-tier

model, a reverse proxy type arrangement should be implemented in tier 1 (the

outermost and usually the presentation layer) with the application’s presentation and

application layers in tier 2 leaving the database layer in tier 3 (the inner most layer)."

That I think is pretty the same that MVC pattern, but my doubt about it is to deploy the application in at least 2 servers.

Well, that makes a bit more sense, but not a lot. Spreading over two servers is not an issue if the RDBMS of your choice is network-capable (i.e. it speaks tcp/ip or a comparable protocol). However, it is problematic to have presentation and application really separated as in webapps, the application is sending the entire presentational data to the client in order to be interpreted and rendered there. If I were you, I’d get back to whoever wrote that spec and demand clarification. It looks a lot like s/he hasn’t got a lot of experience with designing web applications.

If you really need more security (or the impression of it), consider getting a web application firewall such as phpids or mod_security.