Admin User Feb,08 2017
HauntWorld the most advanced haunted and Halloween attraction directory on the web. Hauntworld.com is dedicated to promoting the haunted house industry, which includes haunted houses, attractions, events and vendors who provide products and services. HauntWorld helps to find haunted houses nationwide and additionally offer the national media information about the haunted house industry. Client running around 11 different sites on existing dedicated hosting servers.
Existing infrastructure contains two application servers and one database server. App Server 1 holding mainly two high traffic websites built on ColdFusion and PHP and App Server 2 holding rest of the low traffic websites. Both application servers connected with database server (MSSQL and MySQL database) through LAN.
Issue with Existing Structure
· Single point of failure: Only single server is handling whole traffic for particular website, means in case server crash/failure will down all website hosted on that server and failure of database server will stop website running on both server.
· Seasonal Traffic: All websites related to haunted house directory which mostly in demand during Halloween season (September and October) and rest of the year very less number of users visiting websites. Due to heavy traffic on season many times server unable to handle traffic and site goes down for couple of time.
We have two proposed solution vertical scaling or horizontal scaling or both.
1. Scale Up/Down Vertically:
To scale vertically (or scale up) means to add resources to a single node in a system, typically involving the addition of CPUs or memory to a single computer. During season timing we can scale up and scale down on off season to save cost.
Pros: No additional hardware required, hosting people easily upgrade it with minor fee.
Cons: Single point of failure, downtime while upgrading server, additional settings required once move to new server.
2. Scale Horizontally:
To scale horizontally (or scale out) means to add more nodes to a system, such as adding a new computer to a distributed software application. During season we can add additional two or three additional node to distribute traffic and in off season reduce it to single node.
Pros: High Availability of application, no downtime while adding/removing node.
Cons: Additional hardware or software needed to balance load.
As vertical scaling has single point of failure, decided to scale horizontally for peace of mind during season and give better experience to users. Although cost is matter of consideration but that we are able to control with Amazon Cloud Service.
· Super easy to scale up/down vertically/horizontally using virtualization.
· Provide easy to use interface to add/remove nodes with couple of click of mouse.
· Bunch of services and programmable API which make customization easy.
· Amazon provides pay per use model which best suit with client requirement when we see raise and drop of number of visitor in particular timespan. During October user traffic increase by hundred thousand times than normal day. Client will pay more on October when we have heavy traffic but in other months pay less as oppose to dedicated server which charge same for whole years.
Number of Visitors/Month-Year
Below is configuration we used in normal traffic
1. One large windows RESERVED instance to host all websites under auto stalling group to add additional node in heavy traffic.
2. Elastic load balancer to balance load among all EC2 instance with sticky session.
3. MySQL RDS small RESERVED DB instance.
4. S3 Bucket to store all kind of media files.
On during Halloween season we just add additional instances in auto scaling group to handle traffic and reduce back in off season.
Migrating from dedicated server to cloud with cluster environment where user will be distributed among EC2 instances, we need to make sure that all websites will work under scaling also we want cost in control as this was primary requirement from client. As some of the website using MSSql website we migrate it to MySql as Amazon RDS (Remote data service) support MySql and Oracle only. Although Amazon provide EC2 instance with SQL server but it cost almost four times of MySql.
Move all kind of media (video/images) files to S3 bucket and configure with Amazon CloudFront to faster user experience and easy to scale web application server.
With three years reserve instances we have save more than 55% cost than previous setup also scalable during heavy traffic. (See detailed post here)