Networking equipment is designed for long years of flawless operation. Despite that, many things can still cause packet loss, ranging from power outages through poor wireless networking signal, configuration errors, someone tripping over a cable, or even animals biting through wires. For instance, Google had to protect their underwater cables with Kevlar because they were being bitten by sharks (yes, really). You should always assume that data can get lost somewhere over the network. Even if that doesn't happen, software issues can still occur on the other side of the wire.
To fend off such issues, be sure you have a policy for automatically retrying failed network requests and a way to handle common networking issues. When retrying, try to not overload the other party and not commit the same transaction multiple times. You can use a message queue to store and retry sending for you.
Patterns such as circuit breaker, which we'll show later in this...