Scaling Your Apps (From Shared Hosting to the Cloud)

Status
Not open for further replies.

jason

New Member
Hi, I'm currently developing an app that will be used amongst friends, extended friends, etc. Now if this serves useful to more and more people then I need the server infrastructure in place to support this increase in demand. This as it stands is not a commercial app, but I believe could have commercial potential. At the moment a simple shared hosting account is where it's going to be deployed (here in Ireland) for now.

I have been looking at the likes of small servers in Amazon EC2 and it looks fantastic what you can do with vertical/horizontal scaling on demand, etc. I have some limited experience toying around with it, but was very impressed with what I could accomplish in such an automated environment in the space of a few minutes.

If I did want to port my app over from my shared host to EC2, would all I technically need to do (once I had the app up and running on the new host) is change the A records in DNS for the app's domain name(s) to point at the address of an elastic IP I've assigned to my instance or in the case of farm my load balancer.

Is that right? have I overlooked something? or do you think I'm mad to be jumping in to EC2. My rationale behind EC2 is that I can scale quickly, I don't want to have to wait hours or days to commission a more robust infrastructure when I realize/decide it's needed. Also if I decide something is not worth it, I can pull the plug at a moments notice.
 

niall

New Member
There's a lot more to scaling than just putting the app on multiple servers. You have to think about things like:
1. How are the various instances going to share state? If I login to one instance and then another server handles my next request, will it know who I am?
2. How are you going to scale SQL if it's being used? One RW master with multiple RO slave? Multimaster? Full NDB cluster?
3. How are the static files being served? if you're using static.domain.tld it makes it easy to split out and serve with something light weight like nginx or lighttpd. Not so easy if you have it under www.domain.tld/static as you'll then have to go down the route of having proxies like varnish or squid in front in order to take load off the servers.
4. Are you going to cache pages? File based caching? Memcached?

This is only a small selection of issues that you're likely to run into when going from a single machine setup to a cloud based setup. None of this is insurmountable once you're aware of it early on and design with it in mind, but it can be a royal pain in the hole to tack on later.
 
Status
Not open for further replies.
Top