home · blog · groups · about us · contact us
DevelopmentNow Blog
 Wednesday, May 30, 2007
 
 

VPS Hunt

I've been looking into VPS hosting a bit more and found a few well-recommended providers:

ServInt especially seems to get a lot of kudos, but I know MediaTemple is very popular with the designer crowd. And by looking at my site you know I'm a developer not a designer. ;) A designer friend of mine uses and likes RimuHosting a lot.

GoDaddy Virtual Dedicated Server

Personally, I have months of hands-on experience with GoDaddy's VPS offering, which is pretty inexpensive, and clients have heard of them (or at least seen their SuperBowl commercials). Price is good, performance is ok (not great), but it's a very no-frills offering, and you have to be prepared to administer the server and manage backups yourself. Most of their VPSes are Linux, so you'll be using the shell a lot, but they also offer a Windows 2003 VPS with 10GB of space starting around $40/mo, so you can Remote Desktop into that.

You can pay for better control panels, managed backup, etc., but then the price starts to get into the $60-$100+/mo range, at which point you may want to look at one of the above VPS providers instead.

I also don't know whether they offer any kind of quick upgrade path, in case your site suddenly gets popular and you need to move your VPS to a big dedicated box pronto. I kinda doubt it.

Rolling Stones Gather No ... Mosso?

Other than VPSes, I was also intrigued by Mosso's offering -- hybrid hosting allowing you to run PHP and ASP/ASP.NET sites in the same set of files. However, I don't really care so much about running PHP & ASP side-by-side, since if I really have that kind of blend I might just get two VPSes (one LAMP, one Windows). I was more interested in their focus on making it easier for development companies to provide turnkey hosting and 24x7 tech support services for their clients.

However, they don't support ASP.NET 2.0, which for me is a dealbreaker -- I'd be doing my clients a disservice if I didn't give them the opportunity to upgrade ASP.NET 1.1 sites to 2.0 -- development is faster & easier, features are better, and performance is greater. Plus I have several .NET 2.0 sites already.

 

May 30, 2007    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Monday, May 21, 2007
 
 

An interesting case study over at the CakePHP site about Mingle2, a dating site built in "66.5 Hours."

What I liked about the case study was the developer talked about techniques he used to flesh out features and manage scope. IMO scope control is your most powerful weapon in getting something developed quickly -- many projects can get bogged down with small details that aren't as important yet end up taking a lot of time.

I believe there was a quote I read once, something like "the first 80% of a project takes 80% of the time, and the other 20% takes the other 80% of the time." Or other variants of the 80/20 rule, like "20% of the effort is spent on 80% of the features," etc.

Feel free to make up your own quote, using the numbers "80" and "20," that basically means you can deliver a subset of features significantly faster than an entire set of features, so to develop sites quickly, you should select a good subset of features and build those.

Since the case study is about a dating site, I should probably point out that the developer is single, which gives him more time to put towards startups. I only mention this because Paul Graham blatantly said he "wouldn't advise anyone with a family to start a startup" and "to start startups when you're young." (point #9 in Why to Not Not Start a Startup)

So all you Web 2.0 barons out there -- ditch your significant others for the time being & crank out that web site. Once you're rich from getting acquired by Google, you can try to convince your lost love to come back with expensive reconciliation gifts.

Wait...how did this "rapid development" post turn from scope management to dumping girlfriends? Man, blogs are funny.

Web
May 21, 2007    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 
 

A few Web 2.0 apps I've noticed recently

  • SlimTimer is a time-tracking web site.
  • BlinkSale lets you send invoices. You can import data from Basecamp.
  • Cashboard lets you track time and send invoices. It integrates with Basecamp.
  • Freshbooks also has time tracking and invoicing. It can also do online invoicing/payment. It integrates with Basecamp.

There are probably plenty of others, but anyhow. [edit: like the FOSS BambooInvoice for CodeIgniter]

BTW, is everything Web 2.0 written in Ruby on Rails lately? :)

May 21, 2007    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Sunday, May 20, 2007
 
 

I was writing on a Startupping thread about scalability and figured I could reproduce some of what I wrote here. The topic was about planning and dealing with having to scale web sites as traffic increases. I pasted on some of my responses & added some headings that give a frame of reference to what I'm babbling about. Again, the below is personal experience and opinion, and there's a lot of information on the web to supplement (and I'm sure in some cases contradict) what I refer to, below.

Planning to Scale

In my previous life at a big dot-com, we actually started thinking about multiple servers right away, in order to provide uptime/redundancy & zero-downtime code deployment. We learned along the way, did a lot of research, and/or hired good people with experience. It's always good to have good people. We also hired a few specialty consultants for a few hours of suggestions, and worked with hosting providers who had other big clients, so that we could benefit from their experience.

We started out using software load balancing, moved to hardware load balancers, & eventually to round robin DNS between two large server farms (which had their own hardware load balancers, redundant everything, etc).

We had issues with scaling whenever we hit a specific wall, e.g. when we hit bandwidth & server limits for routers, firewalls, & data centers. We had issues when we hit certain technology limits. We also had issues if we got slashdotted, but that happens. One year we were unexpectedly linked to by a very large, prominent ad on the home page of a top 5 site, so our traffic levels went through the roof, we all got called at 4am, and we stayed pretty busy ensuring things kept running.

A few things we did

  • We used a managed hosting provider who could prep & deliver new servers quickly, to help us with scaling quickly. Managed hosting also meant the provider could help out with monitoring, troubleshooting, setup, and solving problems. So e.g. if you lose a PSU at 2am, you don't have to drive down to a colo and swap it out.
  • We did regular load & performance testing so we knew how many servers we'd need for certain traffic levels. We also did profiling to pinpoint bottlenecks, optimize certain parts of the site, etc.
  • We worked closely with our marketing team, so that we knew about upcoming media blitzes. We kept alerts on blogs & news sites to watch for links, & we kept an eye on our traffic.
  • We had monitors on our servers, so that if traffic/bandwidth/cpu started climbing unexpectedly high, we were alerted & could react before it was too late.
  • We looked at our traffic history so that we knew what times, days, & seasons were popular for our site.
  • We designed our software for easy deployment & replication, & streamlined our server setup process so that once a new server was ready, we could add it into the farm quickly.
  • We consciously built out our site to handle a certain load level, e.g. 3x last year's peak or whatever (3x is a made up example). You obviously need to handle spikes, but being ready & able to handle an "infinite" level of traffic isn't cost-effective, especially when you're young & trying to spend wisely.
  • We planned for & expected scalability & multiple boxes right away.
  • We had remote access to servers, reports, & monitoring tools, so that if a crisis occurred in the off hours, we could contact staff & not wait for them to get into the office.
  • We had names, functions, & phone numbers of key staff printed up on a laminated card (business card size) & given out to a number of staff, so that people could quickly contact others in case of an emergency.
  • We bought staff donuts or pizza or food. It was a cheap way to say thank you & made them feel appreciated & more willing to not complain (too much) when getting calls in the wee hours.

In hindsight, maybe we could have gotten away with spending less time thinking about scalability (or maybe not), but that would have increased our risk of disaster/embarrassment/etc, and potentially made for more painful & frequent firefighting. So there's the tradeoff. Just like other things in business, you can spent extra time and money up front to be more prepared for business growth, or you can wait until later and possibly pay more and feel more pain.

How do you know what load your site should handle? Should it be 3x last year's peak?

There's no magic number. We typically used 2x previous peak as a starting point only, and worked from there based on various factors. We put a good amount of thought into measuring our server performance and determining the traffic we expected and/or wanted to be able to handle, because it translated directly into how many servers we rented and thus how much money we spent on hardware. The load/server number really depends on your budget, your expected growth (including what your marketing team has up their sleeve), your risk/downtime tolerance (including SLAs or clients you have to maintain), and how fast you can scale. I mean, if you started out very small last year, and your marketing department is going to buy a superbowl ad this year, your traffic is going to be 100x last year's mark, not 3x.

So since capacity costs money (and unused capacity gets noticed), you have to plan it out a bit. If you just follow the rule of thumb and buy/rent enough equipment for twice last year's peak (or whatever), then that means most of the time your web servers are running at 1-15% capacity. And unless you have a lot of money, that means you might have management or investors asking you "hey, how come we spend so much money on servers when they're only running at 10%?" We mitigated that issue somewhat by having some servers keep busy performing "non-essential" functions (internal reports, data crunching, load testing, QA, etc) that could be curtailed during a crisis where we need every drop of CPU.

The whole "running at 10% cpu 90% of the time" issue one reason why expandable services like CDNs (content delivery networks), S3, & EC2 are intriguing, b/c in theory they allow you to scale some aspects of your service on demand without having a lot of extra horsepower & bandwidth sitting around unused. Or why VPSes are kinda interesting since you can potentially do some really quick deployments.

Another thing we planned from early on -- we planned to have our images & static files (css, js, etc) running on a separate domain, which allowed us to serve up static files using CDNs or other sources of cheap, fast bandwidth. That also helped us not max out router/datacenter bandwidth (at least not for a while), since images/css/etc are often a large portion of your outbound bandwidth.

Any must-have tools for performance analysis and dealing with traffic?

We were on a Windows platform, so it was tools like Web Application Stress Tool, LoadRunner, and Visual Studio Enterprise Architect's stress/load tool, among others. And of course you'll also want some sort of web analytics package (AWStats, google analystics, webtrends, etc) to tell you what typical user behavior is, what your most popular pages are, etc. Because your tests should mirror typical user behavior if possible. You'll also need performance monitoring tools like PerfMon, etc, so you can see how your servers perform under various loads. So you figure out the page activity levels for a given number of users, max requests per second, max/avg response time, cpu load, how high cpu/ram/disk can go before your performance & user experience starts to drop. There may be better/other tools today, and I don't know what platform you're targeting, but those can get you started. I think it's ok to start with simple tools. We used Excel a good amount, too, to map, graph, and view performance test data.

For monitoring, we used the tools that our hosting provider had (we had managed hosting), but we also had a simple script that ran every X minutes, tried downloading a page, tried executing a database query, checked cpu/ram/etc, & blasted out an email if things seemed wrong. We also wrote our web site to log errors & send out emails if for example, database queries were timing out, or if code started getting bad errors like "out of memory". There are also a number of third party apps & sites that can monitor your site or servers every X minutes & send you alerts -- some will check your serevrs remotely (e.g. Gomez, Webmetrics), while others can install on your servers. I can't think of any installed apps offhand to recommend, but I'm sure you can find something workable w/ some research.

When you start having scaling issues, does your staff spend all their time on scaling instead of development?

If you don't hire any additional staff & don't outsource any work, then yes, as your site gets bigger and your company grows, there's going to be more work to do, and your initial team will probably be spending more time on support/scalability/firefighting/misc tasks.

For us, as the site got more popular, more time needed to be spent on performance/scalability/uptime issues. But we still had features to develop. So we hired more people to keep up with increasing workload.

A supplementary route would be to go with a higher-level hosting provider (e.g. Rackspace) & pay them to help you scale out, and/or hire short term scalability consultants who can give you suggestions, etc. If your app can already scale horizontally, that helps, b/c then you have the luxury of having a choice: either spend time making your app faster, or money buying new servers. Or both.

Another suggestion: if you're starting out very small & cheap, you could start with a VPS on a single server, since you can quickly move that VPS to a bigger/faster machine before you need to scale to multiple machines. Once you go multi-server, you may even want to stick w/ VPSes, since the additional ease of backups/migrations/deployment might make up for the performance hit. Since virtualization technology is getting better all the time, the performance impact of running VPSes is smaller than you'd think (e.g. Xen is supposedly only a 5% hit). 

How quickly you can scale make a big difference in terms of the time you spend on capacity planning and actually scaling your site. Akamai also has some neat stuff (although it can be expensive) that allows them to serve up dynamic pages on their CDN, which in turn reduces the load on your main servers & prevents you from having to set up extra servers as quickly. Think of it like a front-end cache/reverse proxy type thing. Other CDNs might have similar offerings. There are also accelerators (both hardware, or software like Squid) that do similar stuff, although setting up your own front-end cache w/ stuff like Squid means you're losing one of the big benefits of CDNs, namely that they do the scaling instead of you.

 

Hosting | Other | Web
May 20, 2007    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Friday, May 18, 2007
 
 

FYI I started up a new VSN on Ning called GeekBuddy. You can find it at geekbuddy.ning.com. I built it mostly to learn more about the Ning platform, since I think it'll be a viable candidate for people & organizations who want a straightforward, attractive, hosted social network. You can even request the source code (as I have) & make direct modifications. I'll post more thoughts on Ning as I work with it more, but for the time being, if you want to join the GeekBuddy network and say hello, that would be awesome. :)

There are at least two things about Ning that make it not right for everyone, though:

  1. It's a hosted solution, which means you don't have full control over performance, uptime, and upgrade schedule.
  2. You can't 100% remove all Ning.com branding (although you can remove a lot of it). So you don't have a fully-encapsulated user experience, and people will know you used Ning to make your site (which isn't necessarily bad).

For point #2, I think some people worry competitors will see that they used Ning & quickly crank out a clone. I don't think it's as much of an issue as one would think -- for example, no one has that concern about putting a forum on their web site, even though forum software is (now) easy to install.

If your competitors are smart, they probably already know about Ning or some other quick SNS solution. And since software is becoming increasingly commoditized, the way you beat your competitors isn't going to be the software -- it'll be things like your capital, partnerships, content, creativity, marketing, and any customizations you've made to the platform.

Of course, it would be better if your competitors didn't find out about how easy it was to make a social network, but anyhow...

May 18, 2007    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Monday, May 07, 2007
 
 
I wrote about being able to use TFS with Visual Studio Pro before, since the typical instructions are to uninstall VS Pro, then reinstall VS Team Suite. However, I am happy to announce that the instructions in my previous post are correct & do work. So I saved, oh, like 4 hours.
May 7, 2007    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Saturday, May 05, 2007
 
 

I found a good script for backing up MySQL databases that's simple to install and configure -- automysqlbackup (alternate sourceforge link). I suggest reading Marius Ducea's post about automysqlbackup for some tips on how to use it, but you basically download it, edit a few settings at the top (e.g. database connection info), make the script executable, and then either run it manually or add it to a cron job for regular scheduling. It uses the well-known mysqldump utility to make organized directories of backups, and it rolls backups so you don't end up with a bajillion dump files after running it for a month.

MySQLhotcopy is another Perl script (that isn't based on mysqldump) that can also back up your MySQL databases. It actually backs up the database files themselves instead of creating a big text dump, and some people say it's faster and better than mysqldump-based solutions, especially for very large and/or active databases. I haven't used MySQLhotcopy, but it may be worth checking out if for some reason automysqlbackup or mysqldump won't work for you.

Lastly, 33% of our readers submitted this great tip for copying a MySQL database from one server to another (thx Scott):

mysqldump --opt --compress --user=USERHERE --password=PWHERE
 --host=SOURCE.HOST.HERE SOURCE_DB_NAME | mysql --user=USERHERE
 --password=PWHERE --host=TARGET.HOST.HERE -D TARGET_DB_NAME -C
 TARGET_DB_NAME

Note that it should be entered all on one line.

May 5, 2007    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Friday, May 04, 2007
 
 
Dan North has a nice intro to BDD over on his site. BDD = Behavior Driven Development, an evolution of TDD (Test Driven Development). He also has some other blog posts about BDD that help illustrate the difference between BDD and TDD and explain why BDD isn't just TDD with prettier names.
May 4, 2007    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Tuesday, May 01, 2007
 
 

I've been doing some work with full-text searching in MySQL lately & came across a few solutions that could really use a wiki. So I wanted to recommend a free, hosted wiki solution, but the only one I've used is Wikispaces (which IME is slow & annoying). But I learned/read about a few others, so here's a short list of free, hosted wikis, in case your community needs a wiki, but you don't want to bother with installing/hosting one yourself:

There are many others, of course -- wikipedia has a big list of wikifarms showing which ones are free. The biggest risk in using a third party wiki IMO is that they have your data, and if it's a free plan and/or a small company, what guarantee do you have that your content won't go "poof" one day & disappear? Oddwiki (one place you can get a free wiki) even tells you

"Nothing is permanent. Use at your own risk. We plan to delete all wikis that were not edited in 180 days"

Heh. So, that's one reason I'd go with a bigger provider if you don't feel like installing your own wiki (which is pretty easy to do if you have a server you can install one on).

 

Hosting | Web
May 1, 2007    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]