فهرست منبع

Merge pull request #1878 from yichengq/253

rafthttp: increase sender buffer size
Yicheng Qin 11 سال پیش
والد
کامیت
f63d51e40f
1فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  1. 5 1
      rafthttp/sender.go

+ 5 - 1
rafthttp/sender.go

@@ -32,7 +32,11 @@ import (
 
 
 const (
 const (
 	connPerSender = 4
 	connPerSender = 4
-	senderBufSize = connPerSender * 4
+	// senderBufSize is the size of sender buffer, which helps hold the
+	// temporary network latency.
+	// The size ensures that sender does not drop messages when the network
+	// is out of work for less than 1 second in good path.
+	senderBufSize = 64
 
 
 	appRespBatchMs = 50
 	appRespBatchMs = 50