Reimplement write throttle, the netty version was buggy. Should consider fixing the netty version