0:00:00(upbeat music)
0:00:05Hello and welcome to Developing Perspective.
0:00:06Developing Perspective is a podcast discussing news of note,
0:00:09in Apple, iOS, and the like.
0:00:12I'm your host, David Smith.
0:00:13I'm an independent iOS developer.
0:00:15I'm based in Herndon, Virginia,
0:00:16which is just outside of Washington, D.C.
0:00:18And today I'm gonna be talking about hosting,
0:00:20about hosting if you're a small independent business,
0:00:23an independent iOS developer, independent Mac developer,
0:00:27those types of things.
0:00:26and walk through some of the options, what I do and why I do that.
0:00:30So at a high level, I was going to start off by talking about
0:00:34the three or four different options for what you can do
0:00:38if you ever need a server, if you need to host a website, if you need to
0:00:42host a web service, anything like that.
0:00:46To start off with, I guess there's the crazy, expensive thing that I'm not really
0:00:50even going to go into very much because for small indie it's just often a little
0:00:54little overblown unless the core of your service is your server.
0:00:59That would be dedicated hosting.
0:01:04That's where you rent or buy a rack of servers in a data center somewhere.
0:01:06You run your servers off there and go from there.
0:01:10That's only really appropriate or necessary for someone who really needs availability,
0:01:15really needs uptime, really needs the performance that you get by being that close to the metal.
0:01:21For most people though, that's probably a bit overblown if you're just hosting a small web service,
0:01:26something to sync things back and forth, or hosting your own website or those types of things.
0:01:31If you're going to do something like that, you're going to be going to Rackspace, Digital One, people like that.
0:01:37But like I said, it's a bit overblown.
0:01:43Then the next level down is something called virtual private servers.
0:01:46And this is basically where rather than buying a server, you buy space on a server.
0:01:50And so you have full control over that server
0:01:55in the sense that you can install whatever you want,
0:01:59you run whatever you want.
0:02:01It's run in a hosted managed data center,
0:02:02and you have quite a lot of control.
0:02:05And from an external perspective,
0:02:08you have almost the best control
0:02:11as if you had a dedicated machine,
0:02:12but your costs are a lot lower
0:02:14at the expense of non-deterministic behavior sometimes.
0:02:16in terms of you're sharing a machine,
0:02:21someone else could be doing a lot of things
0:02:23that could slow you down.
0:02:25Of course, on the flip side,
0:02:26you also have the benefit of getting more machines
0:02:27at times than you're paying for.
0:02:29And so it's kind of a good balance,
0:02:32and that's what I use for most of what I do.
0:02:35And I'll talk about that further.
0:02:37And then the next level down,
0:02:40you can do cloud computing.
0:02:41This is in EC2 or Heroku,
0:02:42or any of those types of systems where you,
0:02:47rather than even to the extent of buying a VPS,
0:02:51it's like you're buying part of a machine.
0:02:54Cloud computing is like you're buying
0:02:56some kind of ephemeral, vague concept and notion of a machine.
0:02:58It's not really something that you own or control
0:03:02or even know what's going on.
0:03:05You just have a machine one, machine two,
0:03:06and you can spin them up and spin them down.
0:03:08The best examples of this are the ones most widely used,
0:03:13is certainly something like EC2 by Amazon Web Services,
0:03:15which is pretty good.
0:03:19And then you have Rackspace, I think, has a similar product.
0:03:21And you have people who wrap up EC2,
0:03:25for example, Engine Yard Cloud, which I use as well,
0:03:27and I'll talk about in a minute,
0:03:31is takes EC2 and wraps it up
0:03:33in something that's a little easier to work with.
0:03:33So that's sort of, and then I guess you can go all the way
0:03:38to the extent of shared hosting, where it's like a dream host,
0:03:41or one-to-one, or one of these kind of people who do,
0:03:43you're sharing a logical machine with other people,
0:03:49which is only really good for a really light traffic website
0:03:54or something like that.
0:03:57It's not something you'd want to run a big system on.
0:03:58Maybe it's like if you're playing with something,
0:04:00after you register your domain, you just want to throw up
0:04:00a holding page or something maybe, but in general that's probably not what you want
0:04:05to be hosting actual enterprise or performance-critical applications.
0:04:12So now, stepping back, I'm going to talk about the things that I do and why I do them.
0:04:18So, if you're doing anything for web hosting, so hosting a website, hosting a blog, hosting
0:04:26a podcast, something like this.
0:04:31And to some degree, even hosting files.
0:04:34I really recommend using something like Linode.
0:04:37That's who I use.
0:04:40I'll have a link in the show notes to them,
0:04:41which is actually a referral link,
0:04:42but I've been using them for probably about four or five years,
0:04:43and they're fantastic.
0:04:47I've had, I actually can't think of an outage
0:04:48that I knew of that I've ever had with them.
0:04:50So they're a virtual private server company.
0:04:53I lease a fraction of a Linux machine somewhere.
0:04:54I think mine are in Newark, New Jersey, but who doesn't even really matter.
0:04:58And they do a great job of providing a virtual server.
0:05:01So essentially, from my perspective, I can SSH into a Linux box and run it and play with it
0:05:06and do whatever I want with it, and it works great.
0:05:09I don't need to worry about hard drives going out, about weird things happening.
0:05:14In my experience, if a hard drive dies, they're doing something transparently behind it
0:05:19something in the RAID array or however they're doing it, and it works really well.
0:05:24And the great thing about Linode, or hosting on something like Linode, is that you have
0:05:29the benefit of not needing...
0:05:34you don't have to pay very much for quite a lot of performance.
0:05:39So Linode starts their pricing at
0:05:41$20 a month, and that gets you a machine with
0:05:45512 megabytes of RAM, 200 gigabyte hard drive, and 200 gigabytes of outbound data transfer,
0:05:52which you can do quite a lot with. For example, I host my blog, davidsmith.org, on a Linode
0:06:01machine that I have actually for something else. I primarily use it to host a client's
0:06:06web application using passenger and Rails, but I just throw my blog on there in Apache,
0:06:13and it's just an Apache serving out of a static directory that I do with Octopress.
0:06:18And you can do a tremendous amount of traffic and performance out of that.
0:06:23I've been hit by Daring Fireball.
0:06:29See all kinds of other people.
0:06:34See, those are my big spikes.
0:06:36I had Daring Fireball.
0:06:37I was retweeted by Michael Lop.
0:06:38I've been linked to by Sean Blanc or Marco.org.
0:06:40I have to toot my own horn about that, but just to say, I've had some pretty large incoming
0:06:44traffic sources pointing to this, and it's just this tiny little, you know, VPS running
0:06:48Apache and it, I think the highest I ever got was like 4 or 5 percent CPU load, you
0:06:53know, serving thousands of requests in a pretty short period.
0:06:58And so it's a great way to serve something like that.
0:06:59You know, if you've run a static blog, I highly recommend just spinning up a pretty cheap
0:07:04Linode machine.
0:07:05machine. And the great thing too is the transfer pricing is pretty cheap in the sense of once you have
0:07:11it up, if you're 20 bucks a month, you can
0:07:16basically, the way I've seen it, I've never come anywhere close to the transfer pricing.
0:07:23And so for file hosting it's pretty cheap. I host the MP3 as you're listening to right now
0:07:28on the node so that I don't have to pay S3 transfer prices or anything like that. In some ways
0:07:34because it's kind of like a sunk cost.
0:07:39I'm paying them the 20 bucks more for the machine
0:07:40than for the bandwidth, but I get the bandwidth
0:07:43is available to me, and so I host all manner
0:07:45of static resources on my Linux box.
0:07:48Apache serves them super fast, and I found that
0:07:51to be really an effective and good thing.
0:07:53And like I said, this is also a great place
0:07:56to host web services.
0:07:59I wouldn't necessarily put,
0:08:03If you're running a highly dynamic web service,
0:08:08I'd probably go to what I'll talk about next.
0:08:10But if you're just doing a simple static,
0:08:13or a fairly simple website, it works great to just throw
0:08:15a passenger by Fusion into your Apache environment,
0:08:18run MySQL on the same machine, and you're off to the races.
0:08:25You have a pretty high-performance Rails machine
0:08:28that works pretty well.
0:08:30So that's what I do for the VPS side.
0:08:35And then on the other side,
0:08:38that I thought would be interesting to talk about,
0:08:39is what I do for my cloud computing options.
0:08:40And specifically for this, like I said earlier,
0:08:44I use Engine Yard.
0:08:46Engine Yard is a provider,
0:08:47they do dedicated hosting and all kinds of things,
0:08:49and they're primarily focused on Rails
0:08:51or Rails-like things,
0:08:53like you can do Rack and Sinatra and stuff like that.
0:08:54But mostly it's that genre of web applications.
0:08:55And what they do is they provide more managed hosting.
0:08:58And I specifically use their product called Engine Yard Cloud,
0:09:01which allows you to more dynamically scale and play with,
0:09:07from a pricing perspective, the cost of your machine.
0:09:10And I use them for all of my user-critical web services.
0:09:16So for example, for my audiobooks application,
0:09:19I do some of my file management and content management systems
0:09:23that's hosted on there.
0:09:28And I also host the data parser for my recipe book on there.
0:09:30And those things are services that need to be up 24/7.
0:09:35They're critical for my applications to function correctly.
0:09:38And so I put them on a managed hosting environment
0:09:41rather than on my own, VPS,
0:09:44primarily because they know what they're doing.
0:09:46They have a team of people who are really working on
0:09:48making sure everything's working great, everything looks nice.
0:09:50And they have worked out some of the rough edges
0:09:51that I probably could have hosted them on a VPS,
0:09:56but if something goes wrong, I don't have the backup.
0:09:58I don't have the support.
0:10:01They have a nice stack and management tools
0:10:03and monitoring and things all built in.
0:10:05And so it just saves me peace of mind,
0:10:08or I'm paying for the peace of mind of knowing that
0:10:10someone who knows a lot more than I do about hosting
0:10:13is taking care of things.
0:10:16So I'd recommend using them if you're hosting a Rails app.
0:10:17It's certainly not as cheap. I think I find that I spend somewhere about $100 a month or so
0:10:22hosting on Engine Yard for fairly simple web applications.
0:10:28And that's one of the downsides of EC2-based computing, is that it's much more expensive than a VPS, typically.
0:10:32Even if you just did it directly from Amazon and rolled your own, it just costs more to host something
0:10:39and you're paying by the hour.
0:10:43In theory it's good because you can scale up and down, but for my purposes I never really scale up.
0:10:50It's like I'm kind of at the low end of size and performance anyway, so that works pretty well.
0:10:57And so that's kind of how I host things.
0:11:01Like I said, I'd really recommend looking at something like Linode for anybody to have.
0:11:06It's also really useful. It's often found to just have a machine that you can do stuff on.
0:11:11Often, for example, if I have to do some data intensive
0:11:16operations or run some big batch scripts,
0:11:18I just have a machine, I have these Linux boxes
0:11:21sitting in a nice high performance data center
0:11:24with a good internet connection that I can just run stuff on.
0:11:26And even as an example right now, I work in an office
0:11:30that it was cheaper and more effective for me to use
0:11:33a 4G hotspot rather than paying for an internet connection.
0:11:36And so sometimes when I'm doing bandwidth intensive operations
0:11:37actually just SSH into the machine and run them there,
0:11:42where I'm hitting this crazy big bandwidth machine
0:11:45that is right on the backbone of the internet.
0:11:49It lets me do data processing operations really quickly.
0:11:52So anyway, that's just some thoughts
0:11:57that I thought would be helpful
0:11:59to lay out the spectrum there.
0:12:00And like I said, it works well for me,
0:12:02especially since moving a lot of my static resources
0:12:03onto a Linode box running Apache.
0:12:08It saved me a lot of money on S3 hosting,
0:12:12because I used to put everything on S3.
0:12:14And the tricky thing there is,
0:12:16I mean, you pay both for the storage
0:12:18as well as for the transfer of all your things.
0:12:19Whereas with this, once I have a machine,
0:12:22I pay my 20 bucks a month,
0:12:26I can do all manner of things with that
0:12:28and never have a problem.
0:12:30I've never really had reliability problems
0:12:28or availability problems, with something like Apache,
0:12:33it's industrial grade for a reason.
0:12:36It really does a great job of serving static resources
0:12:40with high availability.
0:12:44All right, so that's kind of today's show.
0:12:46Hope you enjoy it.
0:12:48Like I said, today is kind of the first day
0:12:49that I'm back focusing on my own things.
0:12:50I'm kind of not doing consulting as much,
0:12:53and so I expect to probably be able to do a lot more shows.
0:12:54If you have any thoughts or suggestions,
0:12:54that you're interested about in terms of as an iOS developer, as a Mac developer, developer
0:13:00in general, kind of anything that you think I would like my feedback on, please do let
0:13:05me know.
0:13:06Like I said, I'm going to have a lot more availability to do these shows.
0:13:08So any ideas, things that you're interested in, I would love to be able to kind of cater
0:13:11toward that.
0:13:12The easiest ways to get ahold of me are to hit me up with an @ reply on Twitter.
0:13:17I am @_DavidSmith.
0:13:21You can email me, I'm david@david-smith.org.
0:13:27And those are really the two ways to get a hold of me.
0:13:30I'd love to hear from you if you have any thoughts, suggestions, things that you're
0:13:32curious on.
0:13:33Like I said, I've been doing iOS and app store development for a long time, so if you're
0:13:37starting out or have questions about things that you're interested in, please do let me
0:13:40know.
0:13:41Otherwise, have a good day, happy coding, and I will probably talk to you tomorrow.
0:13:45Bye.
0:13:45[BLANK_AUDIO]