Should I choose cloud?
Asked Answered
O

4

6

I'm about to start development on a project with very uncertain load/traffic specifics. When it will be released there will certainly be very low load that can easily be handled by a single desktop quad code machine.

The problem is that there will be (after some invite-only period) a strong publicity for the product so I expect considerable traffic/load peaks.

I haven't read enough about cloud providers and I'm mostly leaning toward Amazon or Azure for the credibility these two companies have without checking them out as I should with others (ie. Rackspace that I suppose is also a cloud service provider).

What I want

I would like to create a normal Asp.net MVC web application that can be run on in-house single machine low-cost server. It would run web server along with database (relational and maybe also document) and fulltext search (not SQL FTS but rather high speed separate product like Lucene or Sphinx). But after initial invite-only period I'd like to move this app to the cloud to make it more traffic/load demand-friendly.

As much as I know Amazon offers a sort of virtual machine hosting which I understand you setup as a normal server but has possible flexible resources in terms of load power. I'm not sure if that can be accomplished on Azure as well.

Questions

  1. What is your experience with application transition to cloud and which one did you choose and why?
  2. What would you recommend I should think about when designing/developing the solution to make the transition as painless as possible.
  3. Based on your experience is it better to move to the cloud (financial wise) or is it better to buy your own servers and load balance application yourself and maybe save money on the long run?
Opia answered 16/12, 2011 at 17:51 Comment(3)
Sounds like you what you really need is colleagues with which to discuss these things. :)Rome
@bzlm: That's right. But if none have cloud experience it would be just as fruitful conversation as if I did the whole investigation myself... And the project I'm on includes only me as a developer. All others aren't...Opia
I cannot believe people voted to close this question. Totally legitimate, topic specif question.Misalliance
F
4

"Cloud" is such a vague term. Still, I think this is a very good question.

Basically, IaaS cloud hosting does not magically make your application scale. It's really a virtual private server with very short contract / cancellation periods.

For scalability, the magic lies not so much in the hosting, but in the horizontal scalability of the application code itself. This is related to all the distributed computing challenges. For example, adding more application servers is not always easy: you must be sure that you don't persist any user state in the server application (but rather in a database, static can be evil), caching can be problematic because local caches can make the situation worse if you're using a round-robin strategy, etc.

  1. What is your experience with application transition to cloud and which one did you choose and why?
  2. What would you recommend I should think about when designing/developing the solution to make the transition as painless as possible.

You don't really have to do anything different just to host on EC2 or Azure -- basically. But of course, it's not that easy when things grow.

For instance, EC2 instance storage is rather limited. Additional storage on EBS, however, does not provide comparable performance characteristics and can be a bit more laggy than a disk. The point here is that EBS does magically scale, and it's probably more PaaS than IaaS; but it's not a simple hard disk and it does, consequently, not behave like a hard drive. I don't know about Azure block storage. In general, expect additional abstraction layers to introduce problems of their own, no matter what they do.

  1. Based on your experience is it better to move to the cloud (financial wise) or is it better to buy your own servers and load balance application yourself and maybe save money on the long run?

Typical cloud providers are more expensive than the usual 'round-the-corner VPS providers, but they are, to my experience, also much more reliable and professional. EC2 has a free tier (but it's quite small), Azure gives you a small instance for free for 3 months.

Doing the calculation right is rather tricky; for example, if you have to shut down your service for whatever reason, it's nice to be able to cancel now rather than pay another year - you might want to put this risk into your calculation. On the other hand, both EC2 and Azure will be considerably cheaper if you sign up for 6 or 12 months, rather than paying by the hour.

You might want to check out the free Azure plan, because it's nice to start fiddling around without any cost. A big advantage of cloud providers is that you can scale vertically very easily: buying a 16 core, 64GB RAM server machine is really expensive, but if there's so much traffic on your site, upgrading your plan won't be such a big issue.

Flutterboard answered 16/12, 2011 at 18:15 Comment(7)
First: When you say that you don't have to do anything different is by my opinion (even though I don't have experience) false. If I'd develop a usual Asp.net MVC + SQL database I suppose I should at least redevelop DAL part of the app to port it to ie. Azure. So things almost never that straightforward. And yes I'm also well aware of the shared resources that each application instance has to share with each other. That shouldn't be a problem.Opia
Second: I had the impression that Amazon's cloud is much more similar to round-the-corner VPS provider than anything else. At least the EC2 part of it.Opia
But otherwise thanks for all the info. Do you have any practical experience in porting an Asp.net MVC application to ie. Azure or Amazon?Opia
Yes, I deployed an application on Azure a couple of days ago. When I say you don't have to change anything, that's literally true. I.e., you can use a local SQL server instance just like on any other server. You might want to use SQL Azure rather than a local instance SQL server to harness the full power of the product, but you don't have to. Otherwise, like you said, EC2 and Azure are much like the typical VPS. They do, however, come with lots of optional features (message bus, cache, email, ebs, etc.) that are more like PaaS and need special care.Flutterboard
I understand you deployed an app to Azure (and probably developed it for Azure the whole time), but did you port and existing production running Asp.net MVC application to it? So that app was running on your servers for a few months and they you decided to move it to the cloud? Because as much a s a friend of mine told me, you have to use a different data provider etc... Which means anything but painless transition.Opia
My app runs with a local MongoDB instance; it was developed on my local machine for a dedicated server and I simply deployed it to Azure. No changes required. But it depends on what you want. If you want to use SQL Azure instead of SQL Server, you might need to change data providers. However, if you don't need SQL Azure, you can use a local SQL server on the Azure instance just like any other.Flutterboard
One thing I just found out: Azure does not guarantee persistent IP addresses, so you should DNS your application through a CNAME rather than an A-record. This can be problematic, in particular if you want to use wildcard subdomains or ip-sensitive features like your own mail server, or you use a service with ip-filtering.Flutterboard
D
3

As someone hasn't mention it yet...

AppHarbor has been amazing. You can push stuff in a matter of minutes. Deployment is a breeze. And setting up your project for it is easier as well. And it doesn't even require any major changes in your solution to fit in.

For the full-text search, you might consider something like Websolr.

Darrickdarrill answered 16/12, 2011 at 18:19 Comment(1)
AppHarbor will generally run any standard ASP.NET application without modification. You can read more about how the platform works.Wrote
C
1

A lot of this depends on what your app is doing (e.g., are there separable components that might benefit from running on different instances, vs. a simple CRUD application with a front end). One thing to consider is that in a cloud application you normally don't have a traditional relational database. As such, you have to choose either cloud or traditional hosting, or plan on coding your access layer twice. Azure does have relational databases (SQL Azure), although they're not identical to SQL Server 2008R2. You're going to have to research the pros/cons of a cloud setup for your specific situation.

As far as financial concerns, it's usually a lot cheaper to just get an account with a hosting company instead of a cloud service, since you pay by the month, instead of the hour (last time I checked an account with Azure running 24/7 for a month would cost about $40-$50, while you can get hosting for $15 a month). The savings with the cloud come in when you have to run several servers, and the cost of maintaining them surpasses the cost of the instance on the cloud platform.

So, sorry, there's no silver bullet answer for you. Read up on the different services available. Consider what your application needs, what prices will be, and go from there.

Chipboard answered 16/12, 2011 at 18:15 Comment(0)
R
0

I have just migrated an MVC-based application from a dedicated server to Azure. When migrating the MSSQl-database, I first tried importing .bacpak files but some of the tables failed because of their size. I then used the SQL Database migratio wizard which worked fine for small tables but failed for tables with BLOB-fields. For these tables I had to use temporary intermediate tables. Then after a while after all the data was transferred setting up the Webapp was a breeze and we went in production. At first, everything seemed to work just fine, but after a couple of hours when the load got heavier, all kind of errors occurred. I went into the Azure portal and it was really easy to see the

Rocha answered 29/3, 2017 at 11:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.