
The existence of these network links is relevant because the time necessary to make a call over a network link is thousands of times longer than what would be necessary to make a call passing the same parameters locally. Further, looking at the time necessary to make a network call in detail reveals two components:
Network Latency – A relatively fixed duration that is incurred by all transmissions across the link. Think of it as the time necessary for the first transmission packet to make its way from the sender, through all intermediate networks and network devices, to the receiver.
Serialization Delay – A highly variable duration that is the time required to move the entire transmission content over the effective bandwidth available. A good analog for this type of transmission delay is water draining out of a sink. The larger the drain hole is, that faster the sink will drain.
Given that these two types of transmission delay together are typically thousands of times longer that memory call durations and neither adds anything positive to the application user’s experience, you would think they should be minimized. That leads us directly to the most fundamental guidelines for performance engineering:
- Reduce the number of calls across application tiers in order to avoid network latency.
- Reduce the size of messages that are passed between application tiers in order to avoid serialization delay.
Design efficiencies that are not related to these two fundamental guidelines do exist and they are important, but I’m always amazed at the variety of performance problems that relate to one of these if you dig into it deep enough.