I think we do not need sync flag. Nginx will send the buffer if last_buf is set, or the buffer is large enough. see ngx_http_write_filter for the detail. Do you agree?