PodSearch

Developing Perspective

#33: Hosting for Indies

 

00:00:00   (upbeat music)

00:00:05   Hello and welcome to Developing Perspective.

00:00:06   Developing Perspective is a podcast discussing news of note,

00:00:09   in Apple, iOS, and the like.

00:00:12   I'm your host, David Smith.

00:00:13   I'm an independent iOS developer.

00:00:15   I'm based in Herndon, Virginia,

00:00:16   which is just outside of Washington, D.C.

00:00:18   And today I'm gonna be talking about hosting,

00:00:20   about hosting if you're a small independent business,

00:00:23   an independent iOS developer, independent Mac developer,

00:00:27   those types of things.

00:00:26   and walk through some of the options, what I do and why I do that.

00:00:30   So at a high level, I was going to start off by talking about

00:00:34   the three or four different options for what you can do

00:00:38   if you ever need a server, if you need to host a website, if you need to

00:00:42   host a web service, anything like that.

00:00:46   To start off with, I guess there's the crazy, expensive thing that I'm not really

00:00:50   even going to go into very much because for small indie it's just often a little

00:00:54   little overblown unless the core of your service is your server.

00:00:59   That would be dedicated hosting.

00:01:04   That's where you rent or buy a rack of servers in a data center somewhere.

00:01:06   You run your servers off there and go from there.

00:01:10   That's only really appropriate or necessary for someone who really needs availability,

00:01:15   really needs uptime, really needs the performance that you get by being that close to the metal.

00:01:21   For most people though, that's probably a bit overblown if you're just hosting a small web service,

00:01:26   something to sync things back and forth, or hosting your own website or those types of things.

00:01:31   If you're going to do something like that, you're going to be going to Rackspace, Digital One, people like that.

00:01:37   But like I said, it's a bit overblown.

00:01:43   Then the next level down is something called virtual private servers.

00:01:46   And this is basically where rather than buying a server, you buy space on a server.

00:01:50   And so you have full control over that server

00:01:55   in the sense that you can install whatever you want,

00:01:59   you run whatever you want.

00:02:01   It's run in a hosted managed data center,

00:02:02   and you have quite a lot of control.

00:02:05   And from an external perspective,

00:02:08   you have almost the best control

00:02:11   as if you had a dedicated machine,

00:02:12   but your costs are a lot lower

00:02:14   at the expense of non-deterministic behavior sometimes.

00:02:16   in terms of you're sharing a machine,

00:02:21   someone else could be doing a lot of things

00:02:23   that could slow you down.

00:02:25   Of course, on the flip side,

00:02:26   you also have the benefit of getting more machines

00:02:27   at times than you're paying for.

00:02:29   And so it's kind of a good balance,

00:02:32   and that's what I use for most of what I do.

00:02:35   And I'll talk about that further.

00:02:37   And then the next level down,

00:02:40   you can do cloud computing.

00:02:41   This is in EC2 or Heroku,

00:02:42   or any of those types of systems where you,

00:02:47   rather than even to the extent of buying a VPS,

00:02:51   it's like you're buying part of a machine.

00:02:54   Cloud computing is like you're buying

00:02:56   some kind of ephemeral, vague concept and notion of a machine.

00:02:58   It's not really something that you own or control

00:03:02   or even know what's going on.

00:03:05   You just have a machine one, machine two,

00:03:06   and you can spin them up and spin them down.

00:03:08   The best examples of this are the ones most widely used,

00:03:13   is certainly something like EC2 by Amazon Web Services,

00:03:15   which is pretty good.

00:03:19   And then you have Rackspace, I think, has a similar product.

00:03:21   And you have people who wrap up EC2,

00:03:25   for example, Engine Yard Cloud, which I use as well,

00:03:27   and I'll talk about in a minute,

00:03:31   is takes EC2 and wraps it up

00:03:33   in something that's a little easier to work with.

00:03:33   So that's sort of, and then I guess you can go all the way

00:03:38   to the extent of shared hosting, where it's like a dream host,

00:03:41   or one-to-one, or one of these kind of people who do,

00:03:43   you're sharing a logical machine with other people,

00:03:49   which is only really good for a really light traffic website

00:03:54   or something like that.

00:03:57   It's not something you'd want to run a big system on.

00:03:58   Maybe it's like if you're playing with something,

00:04:00   after you register your domain, you just want to throw up

00:04:00   a holding page or something maybe, but in general that's probably not what you want

00:04:05   to be hosting actual enterprise or performance-critical applications.

00:04:12   So now, stepping back, I'm going to talk about the things that I do and why I do them.

00:04:18   So, if you're doing anything for web hosting, so hosting a website, hosting a blog, hosting

00:04:26   a podcast, something like this.

00:04:31   And to some degree, even hosting files.

00:04:34   I really recommend using something like Linode.

00:04:37   That's who I use.

00:04:40   I'll have a link in the show notes to them,

00:04:41   which is actually a referral link,

00:04:42   but I've been using them for probably about four or five years,

00:04:43   and they're fantastic.

00:04:47   I've had, I actually can't think of an outage

00:04:48   that I knew of that I've ever had with them.

00:04:50   So they're a virtual private server company.

00:04:53   I lease a fraction of a Linux machine somewhere.

00:04:54   I think mine are in Newark, New Jersey, but who doesn't even really matter.

00:04:58   And they do a great job of providing a virtual server.

00:05:01   So essentially, from my perspective, I can SSH into a Linux box and run it and play with it

00:05:06   and do whatever I want with it, and it works great.

00:05:09   I don't need to worry about hard drives going out, about weird things happening.

00:05:14   In my experience, if a hard drive dies, they're doing something transparently behind it

00:05:19   something in the RAID array or however they're doing it, and it works really well.

00:05:24   And the great thing about Linode, or hosting on something like Linode, is that you have

00:05:29   the benefit of not needing...

00:05:34   you don't have to pay very much for quite a lot of performance.

00:05:39   So Linode starts their pricing at

00:05:41   $20 a month, and that gets you a machine with

00:05:45   512 megabytes of RAM, 200 gigabyte hard drive, and 200 gigabytes of outbound data transfer,

00:05:52   which you can do quite a lot with. For example, I host my blog, davidsmith.org, on a Linode

00:06:01   machine that I have actually for something else. I primarily use it to host a client's

00:06:06   web application using passenger and Rails, but I just throw my blog on there in Apache,

00:06:13   and it's just an Apache serving out of a static directory that I do with Octopress.

00:06:18   And you can do a tremendous amount of traffic and performance out of that.

00:06:23   I've been hit by Daring Fireball.

00:06:29   See all kinds of other people.

00:06:34   See, those are my big spikes.

00:06:36   I had Daring Fireball.

00:06:37   I was retweeted by Michael Lop.

00:06:38   I've been linked to by Sean Blanc or Marco.org.

00:06:40   I have to toot my own horn about that, but just to say, I've had some pretty large incoming

00:06:44   traffic sources pointing to this, and it's just this tiny little, you know, VPS running

00:06:48   Apache and it, I think the highest I ever got was like 4 or 5 percent CPU load, you

00:06:53   know, serving thousands of requests in a pretty short period.

00:06:58   And so it's a great way to serve something like that.

00:06:59   You know, if you've run a static blog, I highly recommend just spinning up a pretty cheap

00:07:04   Linode machine.

00:07:05   machine. And the great thing too is the transfer pricing is pretty cheap in the sense of once you have

00:07:11   it up, if you're 20 bucks a month, you can

00:07:16   basically, the way I've seen it, I've never come anywhere close to the transfer pricing.

00:07:23   And so for file hosting it's pretty cheap. I host the MP3 as you're listening to right now

00:07:28   on the node so that I don't have to pay S3 transfer prices or anything like that. In some ways

00:07:34   because it's kind of like a sunk cost.

00:07:39   I'm paying them the 20 bucks more for the machine

00:07:40   than for the bandwidth, but I get the bandwidth

00:07:43   is available to me, and so I host all manner

00:07:45   of static resources on my Linux box.

00:07:48   Apache serves them super fast, and I found that

00:07:51   to be really an effective and good thing.

00:07:53   And like I said, this is also a great place

00:07:56   to host web services.

00:07:59   I wouldn't necessarily put,

00:08:03   If you're running a highly dynamic web service,

00:08:08   I'd probably go to what I'll talk about next.

00:08:10   But if you're just doing a simple static,

00:08:13   or a fairly simple website, it works great to just throw

00:08:15   a passenger by Fusion into your Apache environment,

00:08:18   run MySQL on the same machine, and you're off to the races.

00:08:25   You have a pretty high-performance Rails machine

00:08:28   that works pretty well.

00:08:30   So that's what I do for the VPS side.

00:08:35   And then on the other side,

00:08:38   that I thought would be interesting to talk about,

00:08:39   is what I do for my cloud computing options.

00:08:40   And specifically for this, like I said earlier,

00:08:44   I use Engine Yard.

00:08:46   Engine Yard is a provider,

00:08:47   they do dedicated hosting and all kinds of things,

00:08:49   and they're primarily focused on Rails

00:08:51   or Rails-like things,

00:08:53   like you can do Rack and Sinatra and stuff like that.

00:08:54   But mostly it's that genre of web applications.

00:08:55   And what they do is they provide more managed hosting.

00:08:58   And I specifically use their product called Engine Yard Cloud,

00:09:01   which allows you to more dynamically scale and play with,

00:09:07   from a pricing perspective, the cost of your machine.

00:09:10   And I use them for all of my user-critical web services.

00:09:16   So for example, for my audiobooks application,

00:09:19   I do some of my file management and content management systems

00:09:23   that's hosted on there.

00:09:28   And I also host the data parser for my recipe book on there.

00:09:30   And those things are services that need to be up 24/7.

00:09:35   They're critical for my applications to function correctly.

00:09:38   And so I put them on a managed hosting environment

00:09:41   rather than on my own, VPS,

00:09:44   primarily because they know what they're doing.

00:09:46   They have a team of people who are really working on

00:09:48   making sure everything's working great, everything looks nice.

00:09:50   And they have worked out some of the rough edges

00:09:51   that I probably could have hosted them on a VPS,

00:09:56   but if something goes wrong, I don't have the backup.

00:09:58   I don't have the support.

00:10:01   They have a nice stack and management tools

00:10:03   and monitoring and things all built in.

00:10:05   And so it just saves me peace of mind,

00:10:08   or I'm paying for the peace of mind of knowing that

00:10:10   someone who knows a lot more than I do about hosting

00:10:13   is taking care of things.

00:10:16   So I'd recommend using them if you're hosting a Rails app.

00:10:17   It's certainly not as cheap. I think I find that I spend somewhere about $100 a month or so

00:10:22   hosting on Engine Yard for fairly simple web applications.

00:10:28   And that's one of the downsides of EC2-based computing, is that it's much more expensive than a VPS, typically.

00:10:32   Even if you just did it directly from Amazon and rolled your own, it just costs more to host something

00:10:39   and you're paying by the hour.

00:10:43   In theory it's good because you can scale up and down, but for my purposes I never really scale up.

00:10:50   It's like I'm kind of at the low end of size and performance anyway, so that works pretty well.

00:10:57   And so that's kind of how I host things.

00:11:01   Like I said, I'd really recommend looking at something like Linode for anybody to have.

00:11:06   It's also really useful. It's often found to just have a machine that you can do stuff on.

00:11:11   Often, for example, if I have to do some data intensive

00:11:16   operations or run some big batch scripts,

00:11:18   I just have a machine, I have these Linux boxes

00:11:21   sitting in a nice high performance data center

00:11:24   with a good internet connection that I can just run stuff on.

00:11:26   And even as an example right now, I work in an office

00:11:30   that it was cheaper and more effective for me to use

00:11:33   a 4G hotspot rather than paying for an internet connection.

00:11:36   And so sometimes when I'm doing bandwidth intensive operations

00:11:37   actually just SSH into the machine and run them there,

00:11:42   where I'm hitting this crazy big bandwidth machine

00:11:45   that is right on the backbone of the internet.

00:11:49   It lets me do data processing operations really quickly.

00:11:52   So anyway, that's just some thoughts

00:11:57   that I thought would be helpful

00:11:59   to lay out the spectrum there.

00:12:00   And like I said, it works well for me,

00:12:02   especially since moving a lot of my static resources

00:12:03   onto a Linode box running Apache.

00:12:08   It saved me a lot of money on S3 hosting,

00:12:12   because I used to put everything on S3.

00:12:14   And the tricky thing there is,

00:12:16   I mean, you pay both for the storage

00:12:18   as well as for the transfer of all your things.

00:12:19   Whereas with this, once I have a machine,

00:12:22   I pay my 20 bucks a month,

00:12:26   I can do all manner of things with that

00:12:28   and never have a problem.

00:12:30   I've never really had reliability problems

00:12:28   or availability problems, with something like Apache,

00:12:33   it's industrial grade for a reason.

00:12:36   It really does a great job of serving static resources

00:12:40   with high availability.

00:12:44   All right, so that's kind of today's show.

00:12:46   Hope you enjoy it.

00:12:48   Like I said, today is kind of the first day

00:12:49   that I'm back focusing on my own things.

00:12:50   I'm kind of not doing consulting as much,

00:12:53   and so I expect to probably be able to do a lot more shows.

00:12:54   If you have any thoughts or suggestions,

00:12:54   that you're interested about in terms of as an iOS developer, as a Mac developer, developer

00:13:00   in general, kind of anything that you think I would like my feedback on, please do let

00:13:05   me know.

00:13:06   Like I said, I'm going to have a lot more availability to do these shows.

00:13:08   So any ideas, things that you're interested in, I would love to be able to kind of cater

00:13:11   toward that.

00:13:12   The easiest ways to get ahold of me are to hit me up with an @ reply on Twitter.

00:13:17   I am @_DavidSmith.

00:13:21   You can email me, I'm david@david-smith.org.

00:13:27   And those are really the two ways to get a hold of me.

00:13:30   I'd love to hear from you if you have any thoughts, suggestions, things that you're

00:13:32   curious on.

00:13:33   Like I said, I've been doing iOS and app store development for a long time, so if you're

00:13:37   starting out or have questions about things that you're interested in, please do let me

00:13:40   know.

00:13:41   Otherwise, have a good day, happy coding, and I will probably talk to you tomorrow.

00:13:45   Bye.

00:13:45   [BLANK_AUDIO]