Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I have a web application that has very fluctuating traffic. I'm talking about 30 to 40 users daily to thousands of people simultaneously. It's a ticketing app so this kind of behavior is here to stay so I want to make a strategic choice I don't want to by a host with a high configuration because it's just going to be sitting around for most of the time. We're running a Node.js server so we usually run low on RAM. My question is this: what are my options and how difficult is it to go from a normal VPS to something like Microsoft Azure, Google Cloud, or AWS.
It's difficult to be specific without knowing more about your application architecture but both AWS Lambda and Google App Engine offer 'serverless architecture' and support Node.js. Serverless architectures allow you to host code directly rather than running servers and associated infrastructure. Scaling is given to you by the services, costs are based on consumption and you can configure constraints and alerts to prevent racking up huge unexpected bills. In both instances you would need to front the services with additional Google or AWS services to make them accessible to customers, but these offer a great way to scale and pay only for what you need.
A first step is to offload static content to Amazon S3 (or similar service). Those services will handle any load and will lessen the load on your web server.
If the load goes up/down gradually (eg over the course of 30 minutes), you can use Auto Scaling to add/remove Amazon EC2 servers based upon load metrics. For example, you probably don't need many servers at night.
However, for handling of spiky traffic, rewriting an application as Serverless will make it highly resilient, highly scalable and most likely a lot cheaper too!
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 days ago.
Improve this question
I have a customer who already has a Production workload running in AWS, and they are exploring DR options. They have a bit of on-prem infrastructure available and were wondering if they could use their on-prem data center as their DR environment for AWS. In searching through the docs, or Googling a solution, everything that is returned is the more typical use case of running production on-prem and DR in AWS. Has anyone seen this reverse setup, and if so, what was the approach?
I would recommend against this approach.
Due to the elastic nature of cloud compute, it is possible to deploy Disaster Recovery systems in the cloud when required, without having them running all the time. This is a different approach to traditional on-premises DR where equipment is sitting unused "just in case" it is required.
This also means that a DR system can be deployed in the cloud that is identical to Production, whereas attempting to deploy on "a bit of on-prem infrastructure" would be quite complex because it would not be identical to Production.
If your customer deployed to AWS using "Infrastructure as a Service" (eg using CloudFormation or Terraform), then deploying the DR system would be as simple as running a script.
An alternative approach to Disaster Recovery is not to fail-over, but instead always run systems in parallel. For example, instead of two web servers running in one Availability Zone, run one web server in each of two different Availability Zones. A Load Balancer would be able to direct traffic to both web servers. If one Availability Zone was to experience a disaster, the web server and load balancer running in the other Availability Zone would continue to operate. This approach is "High Availability" as opposed to Disaster Recovery. Under such an architecture, the system can keep operating even when suffering failures, as opposed to having to "fail-over" to an alternative site. Plus, it avoids having to "fail-back" to the original site, which is typically the hardest part of it all.
An analogy: High Availability is a bit like having two small trucks instead of one large truck -- work can continue even if one truck fails, and another truck can be 'launched' relatively quickly. In contrast, Disaster Recovery would react to a broken truck by pulling a horse out of the stable.
For more information, see: Disaster recovery options in the cloud - Disaster Recovery of Workloads on AWS: Recovery in the Cloud
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
Suppose I own a simple API for my website that receives about 1,000 requests each day and has
an average response time of 50 ms. It is currently hosted on one c4.large instance. To provide high availability at the lowest cost, is it better to create an Auto Scaling Group and use an Application Load Balancer to balance the traffic or recreate the API using Amazon API Gateway and use AWS Lambda as the service backend?
Generally EC2 is less flexible in matching resource consumption to cost when compared to Lambda.
Though there are a whole set of problems when you want to get into Lambda from EC2 world
Is your application type supported on Lambda? If yes, what is the cost of adapting to Lambda's architecture? Even for something considered "simple web API" in EC2 world can lead to huge refactor in Lambda such as when your application expected payload is big or the codebase is using local disk drive extensively
Can you accept the frequent cold-start slow response from lambda. I have seen really simple .NET Core application takes 400-500ms on cold start alone... etc.
I suggest if you have not deployed and used an application on Lambda, do not just blindly try to move them to Lambda from EC2. Start with really small projects and understand the most common pitfalls or read some articles first
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 days ago.
Improve this question
I am extremely new to Amazon Web Services. I would sincerely appreciate any help on finalising the architecture and arriving at a costing schedule. I am working on designing a AWS based solution for a dynamic website that we are designing. To begin with I need to have 2 High CPU Medium Utilisation EC2 instances (both will act as web servers), 1 High CPU Medium Utilisation EC2 instance for my database which will be Postgre SQL and 1 High CPU Medium Utilisation EC2 instance to serve as a read replica for my database. I will also be having a considerable volume of static content like images, videos or just .doc files for which I am contemplating using an S3 bucket. So, my website will be a dynamic + static kind of a website. I am expecting a rapid exponential scale up of users from 0 to say for example 1 million in a year. Hence I will need to scale up my EC2 combos (as described earlier) according to traffic. I am contemplatng using a CloudFormation stack for rapidly scaling my deployment. Also, to efficiently route traffic I will be using a single ELB to start with. Also, I would want to vertically partition my database based on user id's. For example, user ID 1 - 2000 on one EC2 database instance users 2001 to 4000 on second EC2 database instance etc... I will be auto scaling only the web server EC2 instances while my database EC2 instances will have a 100% uptime
My questions are:
What should be my auto scaling strategy for the web server EC2 instances and how do I know what will be the monthly costing when the scaling is so dynamic. I mean is there any way to predict so that I can do a cost break even analysis?
Do all the EC2 instances (web server and database) necessarily need an EBS backing or will Ephemeral storage suffice? I believe that for the database EC2 instances I will need an EBS backing. What about the web server Ec2 instances?
Suppose I end up scaling up to 100 EC2 instances. Will just one ELB suffice or do I need multiple ELBs?
How do I analyse as to how many HTTP requests can one High CPU Medium Utilisation EC2 instance handle before a breakdown?
Can CloudFront be used to host this kind of a dynamic + static site or is it used only for static sites?
Please help me with these questions as I have no clue on cloud solution architecting...
Thanks...
Vikram.
Here is a white paper we (RunSignUp) wrote about how we scaled on Amazon. Our use case was handling opening of an online race registration where 50,000 runners would want to sign up in less than 10 minutes. This shows how we configured everything including settings as well as some of the code we developed. We basically had the same issues as you and did not find anything that had a full use case of how to build a scalable app and how Amazon was used to scale with it. Hope it is helpful.
A quick attempt at an answer to get you started;
#1 is too big to answer without writing a book, it has too much to do with the system and its design to answer in a generic way.
#2 You'll definitely want backing for your database. The web servers on the other hand are probably better off with ephemeral storage, the more stateless/setup free they are, the easier to create/destroy instances dynamically.
#3 As far as I know, there's no upper limit on the number of machines "attached" to a single ELB. Under extreme load, you may experience slightly lesser latency if you split your site over multiple load balancers. You'll find more info that you can map against your actual architecture here.
#4 Only load testing of your system can tell you that.
#5 From the Cloudfront page;
Amazon CloudFront can be used to deliver your entire website, including dynamic, static and streaming content using a global network of edge locations.
In other words, its architecture does not prevent you from mixing static and dynamic content on your site.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm planning to move my Website which is using multiple wordpress to Amazon Services. However, my daily vistors are about 22,000 and sometimes goes to over 90k and the web crashes! However, the hosting company charge me nearly $100 including support without support it would cost $50. the average bandwidth is about 400GB.
Can I ask please how much will it cost me? and how I can start with Amazon Services?
Kind regards
Start out by looking at the different types of hosting that Amazon offers and which one will be the correct fit for your site. Amazon's EC2 (Elastic Cloud Computing) is the servers that you can get hosted in the cloud.
Depending on how much storage space and bandwidth, the costs differ. They have a helpful cost guide on their EC2 page. They offer different pricing for the different types of servers you need. They have on demand spot instances which can be brought up and down on the fly. If you need a server to be running constantly you can put a down payment and have a reserved instance to provide the server.
You can calculate your fees depending on your current usage from the tools AWS provides. http://calculator.s3.amazonaws.com/calc5.html
This is also a good article for getting started with using WordPress under AWS.
http://wp.tutsplus.com/tutorials/scaling-caching/deploy-your-wordpress-blog-to-the-cloud/
AWS also provides a Free Tier of services provided you stay under a certain amount of usage. That is detailed at http://aws.amazon.com/free/ . I also found this YouTube video on setting up EC2 instances very helpful. http://www.youtube.com/watch?v=JPFoDnjR8e8 . From what I understand, unless your WordPress install gets a crazy number of hits you will probably fall under the Free Tier.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I currently have a Linux, Apache, MySQL, PHP, Postfix web server that I setup on a spare computer at home that I am exploring transferring to Amazon Web Services. It's about as simple of a personal web server as it gets, I mainly use it for personal experimentation for PHP development, I have a blog, it hosts my e-mail, plus I do some C++ development on the server and run some small executable and networked personal applications.
The only traffic the server really sees is me (on a daily basis), plus some web crawlers, and the occasional hit from a Google search.
Is it reasonable to transfer my server to Amazon Web Services? Or is Amazon Web Services specifically targeted to larger scale servers? What's about the cheapest cost I can expect to pay for this hosting?
I tried using the AWS Simple Monthly Calculator but had a hard time estimating the numbers. Perhaps someone is doing something similar to my plans, and can inform me of what they are paying.
One of the reasons I am interested in AWS, is I am contemplating using my website as cloud storage for a mobile application I am working on, and if that application takes off quickly, I would like to be able to quickly scale to the traffic.
If you need a simple setup, it is sufficient to use a t1.micro instance. The monthly price for such an instance (depending on the location of the server) is about 15 US$. If you plan to run your server for a longer time, consider using reserved instances. You pay a one-time fee and get reduced hourly prices afterwards. If you run your server all the time, you should use a "High Utilization" instance. I think you won't get a lot of traffic and EBS requests, so I would focus on the main part regarding costs which is the EC2 instance hours.
Here is a basic example calculation with the above setup as a start. This calculation does not include a 1-year-free trial that Amazon offers.
If you need to scale, then you have a lot of options available. You can launch bigger instances if you need it. Have a look at the instance types page to get an overview (also includes details on the Micro instance). If scaling and possible upgrades are a main factor in your decision, then you should consider AWS.
Is it reasonable to transfer my server to Amazon Web Services
I think yes. Amazon has list of Linux versions where you can fetch free server with no payment. Bear in mind that, for example, for free server DB you can't connect to your DB from external IP (aka from external DB tool). But port redirection will work.
Usually I use Amazon for demo versions ( < 10k users). But its work great.