shaping throughput and limiting connections using available heap.