[network] Nagle 알고리즘

in nagle •  7 years ago 

ON : 모아 보내기
OFF : 즉시 보내기

작은 패킷을 가능한 ACK가 올때까지 지연시키고,
ACK가 도착한 시점에,
버퍼에 모인 데이터를 패킷으로 만들어 전송.

장점 : 패킷을 주고 받는 횟수가 줄어 효율성이 높아짐.
단점 : ACK를 받을 때까지 기다려 전송 속도가 느려짐.

TCP_NODELAY (ture : 미적용 | false : 적용)
int opt_val = TRUE;
setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &opt_val, sizeof(opt_val));

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Congratulations @pangcola! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

You published your First Post

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

Upvote this notification to help all Steemit users. Learn why here!

Do not miss the last announcement from @steemitboard!