What breaks first when your application traffic suddenly spikes — the code or the architecture?

Consider a simple setup:
You deploy your web application on a single server.