1. A method comprising: by a first computing device, determining a number of data packets available to transmit from the first computing device to a second computing device, the determination based on an available bandwidth and a payload capacity, each of the data packets having a payload with the payload capacity; by the first computing device, determining a plurality of data items to transmit from the first computing device to the second computing device; by the first computing device, ranking the data items; by the first computing device, selecting, based at least in part on the ranking of the data items and the payload capacities of the data packets, one or more particular ones of the data items to transmit from the first computing device to the second computing device in the data packets; and by the first computing device, writing the particular ones of the data items to the payloads of the data packets.