1. A method comprising: receiving, with a backup network device of a high-availability cluster, a state update message from a primary network device of the high-availability cluster, wherein the state update message indicates a network session being inspected by the primary network device and an identified application-layer protocol for the network session; receiving, with the backup network device, an indication that the primary device has switched over or failed over to the backup network device; after receiving the indication, receiving, with the backup network device, a plurality of packets of the network session, each of the plurality of packets comprising a respective payload including application-layer data; detecting a beginning of a new transaction from the application-layer data of one of the plurality of packets; and processing the application-layer data of the network session that include and follow the beginning of the new transaction without performing stateful processing of the application-layer data that precede the beginning of the new transaction.