Build for Scalability, but beware of Premature Optimization

Build for Scalability, but beware of Premature Optimization

— This post is part of a series of ongoing tips on lessons learned & experiences I”ve had as the lead developer of the online dating startup, at Though these tips are focused primary at consumer startups, they ring true elsewhere too. For a full list of these tips, see 10 things I”d wish I”d known as a lead developer at Techstars. —

I spend a lot of time worrying about how my system is going to scale. The next time we get that big press piece or hit some load issue, I want to make sure that I have a plan in place.

Build for Scalability
I”ve collected a small bag of tricks to help the performance of my application (which is coded in PHP, MySQL and jQuery).
– Learn how to use MySQL indexing.
– Use include(); sparingly (PHP only).
– Use Memcache in your database layer.
– Use front-end hacks like far-futures expires headers, CSS sprites, and image maps.
– Perhaps this goes without saying, but: Make sure your code-architecture is de-coupled and highly logically-cohesive. More on this here.
– Prepare your database architecture for scalability. This post, by Digg”s Joe Stump, does a good job of laying out their database architecture.

Beware of premature optimization
Sometimes you bend over backwards to make sure a new feature is entirely scalable, and when you launch, nobody (or almost nobody) uses it.

You may not know for sure which features your users are going to use heavily. You could have a hunch, but you don”t know for sure until you launch that new feature.

It”s a balance, for sure. I don”t know that I have the magic formula. But, I think I”ve struck a good balance by considering which features are critical/central to the system, building for scalability, being careful not to make any short-sighted design decisions, writing good documentation, and following my instincts.

In the spirit of giving credit where it”s due, I”d like to mention that Eventvue”s Josh Fraser gave me the idea for this post during my time in Boulder last month. Check out his blog, Online Aspect, for his musings on his adventures at Event Vue.

Note: Any information of proprietary value to my employer has been removed or approved, and this post has been approved by my employer.

Comments are closed.