network, or process, to handle a growing amount of work in a capable manner or its ability to be enlarged to accommodate that growth. For example, it can refer to the capability of a system to increase total throughput under an increased load when resources (typically hardware) are added. source: wikipedia
== bad • Go == good • Not truly related to scalability because you can always throw more hardware at it. • But if you like money, choose the right language. ◦ We cut our server requirements by 90% by switching
The more features you add, the harder it is to scale. • Consider every feature and how it will affect things, most importantly your data store ◦ ie: inspect the queries
improve performance Your database does a lot of work. Take some load off it by caching things. If it's something that is looked up often, like checking authentication, cache it for a short period of time, even if it's just 30 seconds.
• Return the required information to the client as fast as possible, queue up the rest. • Stats, logs, notifications, etc. • Put messages in queue, let other servers (worker servers) deal with the messages on their own time. Note: there's this really awesome message queue I heard about called IronMQ.
boxes, you're doing it wrong. • You should be able to launch servers that self configure and get added to the resource pool automatically. • If you find yourself firing up your SSH client, fix your scripts instead and then launch new servers.
what you can handle • Add more resources • Repeat... Production testing: • Test your API's all the time, CI is not enough ◦ Anything in your system can fail, you should find it before your users
Make sure it hits an endpoint that touches your database. • Install monitoring daemons on your servers and collect that data somewhere. ◦ Librato or Datadog are good • Collect key metrics ◦ Throw them at StatHat or Librato • SETUP ALERTS!!! ◦ The graphs are nice, but you need to know immediately when something goes wrong.