Employ asynchronous processing when possible
When the interaction with the user results in long and heavy processing by the server, employ asynchronous processing when possible. The idea is to encourage the user to trigger the processing and then reconnect once it is complete e.g. by receiving an email with a link.
This method allows processing to be done in batches, often more efficient in terms of resources than on-the-fly synchronous processing. This frees up the presentation servers so that they can handle other users while the processing is handled asynchronously server-side.
Choose a suitable data format
Picking the wrong data type:
- wastes memory (e.g. if you store all small data in a column designed to store large amounts of data) - causes performance issues (it will be quicker to search for a number than a character string)
Ideally, you should analyze a representative data sample and use this information to decide the data type and sizing.