NFS for media, Redis for sessions and cache.
If you are asking this question, part of me feels like advising you that you shouldn't attempt this endeavour alone.
When running a multi server configuration, you have a huge number of things to factor in.
- Server application configuration management (ie. Chef/Puppet/Ansible), so that all machines in the cluster are exactly the same
- Fault tolerance and management, so that nodes are healthchecked and removed from the load balancer when failed
- Distribution of single server activities, ie. on which machine your crons run on
- Deployment and management of codebase, so your Magento file structure is identical on all machines
- Log aggregation and management (for centralised overview)
- Service management, instrumentation and data collection (ie. graphing) of all respective elements from a single location
You need to give thought to all of these aspects, merely managing sessions/media is a tiny fraction of running a complex multi server configuration. When you multiply your server count, you multiply your points of failure, so you need to adequately plan for this.
Ie. You can't just run your NFS master from a single web server, because when that fails, your other machine will fail too. So you need to consider your high availability requirements from the start (ie. planning for failure).
If you want a reliable cluster, you'll need,
- 2 Load balancers
- 2 Web servers
- 2 NFS stores
- 2 Cache backends
- 2 Database servers
- 2 Monitoring servers
Ie. Two of everything.
Then configure high availability of each service layer, with full real time replication of data.
Save yourself the complexity, the risk, the confusion and just run a single web server and scale vertically until such point you hit a ceiling. Then at that point, you can assume your business is large enough to warrant using a proper managed service anyway. Learning to build a cluster at the cost of your own business is not wise.