Writing something that horribly fails to scale, then learning from your mistakes. :)
Seriously, though, come up with a hypothesis about how your system will scale, then devise an experiment to test the hypothesis. If the hypothesis fails, figure out why, fix it and repeat until you get the behavior you want.
The next important piece is monitoring and measuring the performance metrics important to you, then figure out how to change your architecture when the system grows enough to have new bottlenecks.
Having a good load test tool, for example, can be invaluable in learning how your system actually performs.
Seriously, though, come up with a hypothesis about how your system will scale, then devise an experiment to test the hypothesis. If the hypothesis fails, figure out why, fix it and repeat until you get the behavior you want.
The next important piece is monitoring and measuring the performance metrics important to you, then figure out how to change your architecture when the system grows enough to have new bottlenecks.
Having a good load test tool, for example, can be invaluable in learning how your system actually performs.