DEV Community

Serguey Shinder
Serguey Shinder

Posted on

Every Label Our Depots Printed Went Up to the Cloud and Back

When we moved the warehouse system out of our data centre last year, label printing moved with it. That seemed obvious, since labels are generated from the order and the print service had always run beside the warehouse system.

In our own data centre that arrangement had cost nothing, because every depot reached it over the same private network and the label files were small. In the cloud the arrangement was the same and the traffic was not. The new print service rendered each label as an image, around a hundred and eighty kilobytes, and sent it down the depot's internet line to the printer. A busy depot prints about nine thousand labels an hour in the evening peak, which is roughly one and a half gigabytes an hour.

Nobody saw it in testing, because testing had been done at one depot on a quiet afternoon. In November the evening peak arrived at all of them at once. The time from scan to label went from just under a second to four or five, and at a packing bench four seconds per parcel turns into a queue. At two depots the line was so busy that scanner transactions began to time out as well. When one depot lost its circuit for forty minutes in December, it could not print a single label, although every parcel on the bench had already been picked.

We had sized the move by what the application needed. Nobody had sized what the application sent to the places it served.

Each depot now has a small print server of its own. The cloud system sends it the label data, a few hundred bytes per parcel, and the depot builds the label locally from templates it keeps in a cache. Labels go to the printers in the printers' own command language rather than as pictures. If the line drops, the depot can still print every order already released to it. Label traffic at peak fell by more than ninety five percent, and scan to label is back under a second.

Any move we plan now includes a list of every site the system talks to and how much it sends to each one in the busiest hour. Where an application runs turned out to be a decision about the network as much as about the server.

– Serguey Shinder

Top comments (0)