2

So I have all of my sites hosted at Slicehost and right now have each application on a separate slice.

Would it make sense to get a separate slice setup for just memcache and have my separate apps all use memcache on that slice?

What would be the cons of doing this? Pros I can see are just managing one memcache installation and being able to optimize the slice specifically to serve up cached file quickly and not worry about anything else.

Shpigford
  • 169
  • 1
  • 5

2 Answers2

2

Assuming the rest of your setup is good as it is, then no.

As temoto writes Memcached was created to run on webnodes (web application servers), under the assumption that webnodes are heavily loaded on CPU, but have free RAM. Memcached's whole architecture is built for it to run on multiple servers; the more the merrier.

So if you should run Memcached, you should run it on all servers that have some free RAM. Arguably, you should also run all your web applications on all web-servers (on different ports) in order to have your full CPU capacity available for load spikes. (Use a load balancer in front to route traffic to the right applications based on the URL.)

However, this setup would be more complex to administrate in day to day sysadmin work. This is probably not the best way to scale your applications.

You don't write which platform you're using. Most modern web application servers have a in-process caching mechanism available. Take a look at in-process caching before going to networked caching like Memcached...

0

In theory, web application consumes lots of CPU (request parsing, template rendering) and small amount of memory. Memcached is opposite. Which makes them perfect neighbours.

But in practice, your applications typically use some database server, which has it's internal cache and in general works better with more memory.

It's hard to give advice for such a generic situation, since you didn't provide details.

  • If you want simpler maintanance, go for separate everything for each website. If something goes wrong, only that single site goes down.
  • If you want to use existing resources more intensively, dedicate one or two slices for DB and use all other slices for memcache.
  • It wouldn't make sense to separate a slice for memcached only, because CPU of that machine would sleep forever: you use only memory, not using CPU cycles. Good for hoster, bad for you.

But before changing anything, do a deep analysis, find out where is your current bottleneck.

temoto
  • 137
  • 7