1. 2

    Keeping the connections persistent is key. I believe that an open file handle only has 4 KB of memory overhead; as long as your devices call home on a regular basis (smaller than the timeout interval), the problem solves itself.