{"id":219,"date":"2022-02-13T11:02:57","date_gmt":"2022-02-13T11:02:57","guid":{"rendered":"https:\/\/liangqi.org\/?p=219"},"modified":"2022-02-13T11:02:57","modified_gmt":"2022-02-13T11:02:57","slug":"tcp-ip%e5%a6%82%e4%bd%95%e5%b7%a5%e4%bd%9c-%ef%bc%88kafka-producer%e6%9c%ba%e5%88%b6%ef%bc%89","status":"publish","type":"post","link":"https:\/\/liangqi.org\/?p=219","title":{"rendered":"Tcp\/Ip\u5982\u4f55\u5de5\u4f5c \uff08Kafka producer\u673a\u5236\uff09"},"content":{"rendered":"\n<p>Application\u5982\u679c\u9700\u8981\u53d1\u9001\u6d88\u606f\uff0c\u662f\u5148\u53d1\u5230\u64cd\u4f5c\u7cfb\u7edf\u7684socket write buffer. \u5982\u679cbuffer\uff08queue\uff09\u6ee1\u4e86\uff0c\u5c31\u662ftcp congestion\u3002\u540c\u6837\u7684\uff0c\u5916\u90e8\u6765\u7684\u6d88\u606f\u4f1a\u5148\u5230\u64cd\u4f5c\u7cfb\u7edf\u7684socket receive buffer.\u5982\u679cbuffer\u6ee1\u4e86\uff0c\u64cd\u4f5c\u7cfb\u7edf\u5c31\u4e0d\u4f1aack\u90a3\u4e2a\u6d88\u606f\uff0c\u4e5f\u662fcongestion\u3002<\/p>\n\n\n\n<p>\u8fd9\u4e2abuffer\u7684\u5c3a\u5bf8\u5e76\u4e0d\u5927\uff0c\u53ef\u4ee5\u901a\u8fc7\u4e00\u4e0b\u547d\u4ee4\u67e5\u8be2\u3002\u53c2\u6570\u5206\u522b\u4ee3\u8868,min, default, max:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>liangqi@nuci5-2:~$ cat \/proc\/sys\/net\/ipv4\/tcp_rmem\n4096\t131072\t6291456\nliangqi@nuci5-2:~$ cat \/proc\/sys\/net\/ipv4\/tcp_wmem\n4096\t16384\t4194304<\/code><\/pre>\n\n\n\n<p>\u4e4b\u6240\u4ee5\u770b\u5230\u662f\u56e0\u4e3a\u770b\u8fd9\u7bc7\u6587\u7ae0<br>http:\/\/cloudurable.com\/blog\/kafka-tutorial-kafka-producer-advanced-java-<a href=\"http:\/\/cloudurable.com\/blog\/kafka-tutorial-kafka-producer-advanced-java-examples\/index.html#:~:text=The%20Kafka%20Producer%20has%20a,acks%20to%20control%20record%20durability.\" target=\"_blank\" rel=\"noreferrer noopener\">examples\/index.html#:~:text=The%20Kafka%20Producer%20has%20a,acks%20to%20control%20record%20durability.<\/a><\/p>\n\n\n\n<p>\u5982\u679cact\u662f0\uff0c\u90a3\u4e48application\u53ea\u662f\u628a\u6d88\u606f\u9001\u5230socket buffer\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n\n\n\n<p>\u8fd8\u6709\u4e00\u4e2a\u914d\u7f6e\u53c2\u6570 <code>buffer.memory<\/code> \u8fd9\u4e2a\u662fapplication level\u7684setting\uff0c\u5f53broker\u65e0\u6cd5\u8bbf\u95ee\uff0c\u5c31\u4f1a\u628a\u6d88\u606f\u653e\u5728\u5185\u5b58\u4e2d\u7b49\u5f85\uff0c\u5728 <code>max.block.ms<\/code> \u5230\u671f\u4e4b\u524d\uff0csend\u5c31\u4f1a\u7b49\u5f85\uff0c\u5230\u671f\u5c31\u4f1a\u629b\u4e00\u573a\u3002producer \u4e5f\u6709\u91cd\u8bd5\u673a\u5236\u3002<\/p>\n\n\n\n<p>\u4f46\u662f\u8fd9\u91cc\u6709\u4e00\u4e2a\u7591\u95ee\uff0cbroker\u4e0d\u53ef\u8bbf\u95ee\uff0c\u662f\u4e0d\u662f\u64cd\u4f5c\u7cfb\u7edf\u7684socket write buffer\u4e5f\u4f1a\u6ee1\uff1f\u6211\u89c9\u5f97\u4e0d\u4f1a\uff0c\u5982\u679csocket buffer\u6ee1\u4e86\u5c31\u4f1a\u5f71\u54cd\u6240\u6709\u7684application\uff0c\u8fd9\u4e2a\u76f8\u5f53\u4e8e\u5916\u90e8\u7684\u4e00\u4e2a\u76ee\u6807\u65e0\u6cd5\u8bbf\u95ee\u5c31\u5bfc\u81f4\u6240\u6709\u7684\u5bf9\u5916\u8fde\u63a5\u5931\u6548\u3002\u5e94\u8be5\u662f\u6709\u4e00\u4e2a\u673a\u5236\u64cd\u4f5c\u7cfb\u7edf\u77e5\u9053\u5916\u90e8\u7f51\u7edc\u4e0d\u53ef\u9001\u8fbe\uff0c\u7136\u540e\u5c31\u4f1a\u6e05\u695a\u7f13\u5b58\uff0c\u544a\u8bc9application\u76ee\u6807\u4e0d\u53ef\u8fbe\uff0c\u7136\u540eapplication\u5c31\u4f1acache\u8bf7\u6c42\uff0c\u7136\u540e\u4e0d\u65ad\u7684\u91cd\u8bd5\u3002<\/p>\n\n\n\n<p><a href=\"https:\/\/stackoverflow.com\/questions\/49649241\/apache-kafka-batch-size-vs-buffer-memory\">https:\/\/stackoverflow.com\/questions\/49649241\/apache-kafka-batch-size-vs-buffer-memory<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Application\u5982\u679c\u9700\u8981\u53d1\u9001\u6d88\u606f\uff0c\u662f\u5148\u53d1\u5230\u64cd\u4f5c\u7cfb\u7edf\u7684socket write buffer. \u5982\u679cbuffer\uff08queue\uff09\u6ee1\u4e86\uff0c\u5c31\u662ftcp congestion\u3002\u540c\u6837\u7684\uff0c\u5916\u90e8\u6765\u7684\u6d88\u606f\u4f1a\u5148\u5230\u64cd\u4f5c\u7cfb\u7edf\u7684socket receive buffer.\u5982\u679cbuffer\u6ee1\u4e86\uff0c\u64cd\u4f5c\u7cfb\u7edf\u5c31\u4e0d\u4f1aack\u90a3\u4e2a\u6d88\u606f\uff0c\u4e5f\u662fcongestion\u3002 \u8fd9\u4e2abuffer\u7684\u5c3a\u5bf8\u5e76\u4e0d\u5927\uff0c\u53ef\u4ee5\u901a\u8fc7\u4e00\u4e0b\u547d\u4ee4\u67e5\u8be2\u3002\u53c2\u6570\u5206\u522b\u4ee3\u8868,min, default, max: \u4e4b\u6240\u4ee5\u770b\u5230\u662f\u56e0\u4e3a\u770b\u8fd9\u7bc7\u6587\u7ae0http:\/\/cloudurable.com\/blog\/kafka-tutorial-kafka-producer-advanced-java-examples\/index.html#:~:text=The%20Kafka%20Producer%20has%20a,acks%20to%20control%20record%20durability. \u5982\u679cact\u662f0\uff0c\u90a3\u4e48application\u53ea\u662f\u628a\u6d88\u606f\u9001\u5230socket buffer\u5c31\u53ef\u4ee5\u4e86\u3002 \u8fd8\u6709\u4e00\u4e2a\u914d\u7f6e\u53c2\u6570 buffer.memory \u8fd9\u4e2a\u662fapplication level\u7684setting\uff0c\u5f53broker\u65e0\u6cd5\u8bbf\u95ee\uff0c\u5c31\u4f1a\u628a\u6d88\u606f\u653e\u5728\u5185\u5b58\u4e2d\u7b49\u5f85\uff0c\u5728 max.block.ms \u5230\u671f\u4e4b\u524d\uff0csend\u5c31\u4f1a\u7b49\u5f85\uff0c\u5230\u671f\u5c31\u4f1a\u629b\u4e00\u573a\u3002producer \u4e5f\u6709\u91cd\u8bd5\u673a\u5236\u3002 \u4f46\u662f\u8fd9\u91cc\u6709\u4e00\u4e2a\u7591\u95ee\uff0cbroker\u4e0d\u53ef\u8bbf\u95ee\uff0c\u662f\u4e0d\u662f\u64cd\u4f5c\u7cfb\u7edf\u7684socket write buffer\u4e5f\u4f1a\u6ee1\uff1f\u6211\u89c9\u5f97\u4e0d\u4f1a\uff0c\u5982\u679csocket buffer\u6ee1\u4e86\u5c31\u4f1a\u5f71\u54cd\u6240\u6709\u7684application\uff0c\u8fd9\u4e2a\u76f8\u5f53\u4e8e\u5916\u90e8\u7684\u4e00\u4e2a\u76ee\u6807\u65e0\u6cd5\u8bbf\u95ee\u5c31\u5bfc\u81f4\u6240\u6709\u7684\u5bf9\u5916\u8fde\u63a5\u5931\u6548\u3002\u5e94\u8be5\u662f\u6709\u4e00\u4e2a\u673a\u5236\u64cd\u4f5c\u7cfb\u7edf\u77e5\u9053\u5916\u90e8\u7f51\u7edc\u4e0d\u53ef\u9001\u8fbe\uff0c\u7136\u540e\u5c31\u4f1a\u6e05\u695a\u7f13\u5b58\uff0c\u544a\u8bc9application\u76ee\u6807\u4e0d\u53ef\u8fbe\uff0c\u7136\u540eapplication\u5c31\u4f1acache\u8bf7\u6c42\uff0c\u7136\u540e\u4e0d\u65ad\u7684\u91cd\u8bd5\u3002 https:\/\/stackoverflow.com\/questions\/49649241\/apache-kafka-batch-size-vs-buffer-memory<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30,16],"tags":[],"class_list":["post-219","post","type-post","status-publish","format-standard","hentry","category-kafka","category-16"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Tcp\/Ip\u5982\u4f55\u5de5\u4f5c \uff08Kafka producer\u673a\u5236\uff09 - Liangqi\u2018s Technical Journey<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/liangqi.org\/?p=219\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Tcp\/Ip\u5982\u4f55\u5de5\u4f5c \uff08Kafka producer\u673a\u5236\uff09 - Liangqi\u2018s Technical Journey\" \/>\n<meta property=\"og:description\" content=\"Application\u5982\u679c\u9700\u8981\u53d1\u9001\u6d88\u606f\uff0c\u662f\u5148\u53d1\u5230\u64cd\u4f5c\u7cfb\u7edf\u7684socket write buffer. \u5982\u679cbuffer\uff08queue\uff09\u6ee1\u4e86\uff0c\u5c31\u662ftcp congestion\u3002\u540c\u6837\u7684\uff0c\u5916\u90e8\u6765\u7684\u6d88\u606f\u4f1a\u5148\u5230\u64cd\u4f5c\u7cfb\u7edf\u7684socket receive buffer.\u5982\u679cbuffer\u6ee1\u4e86\uff0c\u64cd\u4f5c\u7cfb\u7edf\u5c31\u4e0d\u4f1aack\u90a3\u4e2a\u6d88\u606f\uff0c\u4e5f\u662fcongestion\u3002 \u8fd9\u4e2abuffer\u7684\u5c3a\u5bf8\u5e76\u4e0d\u5927\uff0c\u53ef\u4ee5\u901a\u8fc7\u4e00\u4e0b\u547d\u4ee4\u67e5\u8be2\u3002\u53c2\u6570\u5206\u522b\u4ee3\u8868,min, default, max: \u4e4b\u6240\u4ee5\u770b\u5230\u662f\u56e0\u4e3a\u770b\u8fd9\u7bc7\u6587\u7ae0http:\/\/cloudurable.com\/blog\/kafka-tutorial-kafka-producer-advanced-java-examples\/index.html#:~:text=The%20Kafka%20Producer%20has%20a,acks%20to%20control%20record%20durability. \u5982\u679cact\u662f0\uff0c\u90a3\u4e48application\u53ea\u662f\u628a\u6d88\u606f\u9001\u5230socket buffer\u5c31\u53ef\u4ee5\u4e86\u3002 \u8fd8\u6709\u4e00\u4e2a\u914d\u7f6e\u53c2\u6570 buffer.memory \u8fd9\u4e2a\u662fapplication level\u7684setting\uff0c\u5f53broker\u65e0\u6cd5\u8bbf\u95ee\uff0c\u5c31\u4f1a\u628a\u6d88\u606f\u653e\u5728\u5185\u5b58\u4e2d\u7b49\u5f85\uff0c\u5728 max.block.ms \u5230\u671f\u4e4b\u524d\uff0csend\u5c31\u4f1a\u7b49\u5f85\uff0c\u5230\u671f\u5c31\u4f1a\u629b\u4e00\u573a\u3002producer \u4e5f\u6709\u91cd\u8bd5\u673a\u5236\u3002 \u4f46\u662f\u8fd9\u91cc\u6709\u4e00\u4e2a\u7591\u95ee\uff0cbroker\u4e0d\u53ef\u8bbf\u95ee\uff0c\u662f\u4e0d\u662f\u64cd\u4f5c\u7cfb\u7edf\u7684socket write buffer\u4e5f\u4f1a\u6ee1\uff1f\u6211\u89c9\u5f97\u4e0d\u4f1a\uff0c\u5982\u679csocket buffer\u6ee1\u4e86\u5c31\u4f1a\u5f71\u54cd\u6240\u6709\u7684application\uff0c\u8fd9\u4e2a\u76f8\u5f53\u4e8e\u5916\u90e8\u7684\u4e00\u4e2a\u76ee\u6807\u65e0\u6cd5\u8bbf\u95ee\u5c31\u5bfc\u81f4\u6240\u6709\u7684\u5bf9\u5916\u8fde\u63a5\u5931\u6548\u3002\u5e94\u8be5\u662f\u6709\u4e00\u4e2a\u673a\u5236\u64cd\u4f5c\u7cfb\u7edf\u77e5\u9053\u5916\u90e8\u7f51\u7edc\u4e0d\u53ef\u9001\u8fbe\uff0c\u7136\u540e\u5c31\u4f1a\u6e05\u695a\u7f13\u5b58\uff0c\u544a\u8bc9application\u76ee\u6807\u4e0d\u53ef\u8fbe\uff0c\u7136\u540eapplication\u5c31\u4f1acache\u8bf7\u6c42\uff0c\u7136\u540e\u4e0d\u65ad\u7684\u91cd\u8bd5\u3002 https:\/\/stackoverflow.com\/questions\/49649241\/apache-kafka-batch-size-vs-buffer-memory\" \/>\n<meta property=\"og:url\" content=\"https:\/\/liangqi.org\/?p=219\" \/>\n<meta property=\"og:site_name\" content=\"Liangqi\u2018s Technical Journey\" \/>\n<meta property=\"article:published_time\" content=\"2022-02-13T11:02:57+00:00\" \/>\n<meta name=\"author\" content=\"liangqi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"liangqi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/liangqi.org\/?p=219#article\",\"isPartOf\":{\"@id\":\"https:\/\/liangqi.org\/?p=219\"},\"author\":{\"name\":\"liangqi\",\"@id\":\"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3\"},\"headline\":\"Tcp\/Ip\u5982\u4f55\u5de5\u4f5c \uff08Kafka producer\u673a\u5236\uff09\",\"datePublished\":\"2022-02-13T11:02:57+00:00\",\"dateModified\":\"2022-02-13T11:02:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/liangqi.org\/?p=219\"},\"wordCount\":65,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3\"},\"articleSection\":[\"Kafka\",\"\u6280\u672f\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/liangqi.org\/?p=219#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/liangqi.org\/?p=219\",\"url\":\"https:\/\/liangqi.org\/?p=219\",\"name\":\"Tcp\/Ip\u5982\u4f55\u5de5\u4f5c \uff08Kafka producer\u673a\u5236\uff09 - Liangqi\u2018s Technical Journey\",\"isPartOf\":{\"@id\":\"https:\/\/liangqi.org\/#website\"},\"datePublished\":\"2022-02-13T11:02:57+00:00\",\"dateModified\":\"2022-02-13T11:02:57+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/liangqi.org\/?p=219#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/liangqi.org\/?p=219\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/liangqi.org\/?p=219#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/liangqi.org\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tcp\/Ip\u5982\u4f55\u5de5\u4f5c \uff08Kafka producer\u673a\u5236\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/liangqi.org\/#website\",\"url\":\"https:\/\/liangqi.org\/\",\"name\":\"Liangqi\u2018s Technical Journey\",\"description\":\"Chasing Excellence; Enjoy life.\",\"publisher\":{\"@id\":\"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/liangqi.org\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3\",\"name\":\"liangqi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/liangqi.org\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/liangqi.org\/wp-content\/uploads\/2022\/01\/P1100089-3-scaled.jpg\",\"contentUrl\":\"https:\/\/liangqi.org\/wp-content\/uploads\/2022\/01\/P1100089-3-scaled.jpg\",\"width\":2560,\"height\":1920,\"caption\":\"liangqi\"},\"logo\":{\"@id\":\"https:\/\/liangqi.org\/#\/schema\/person\/image\/\"},\"sameAs\":[\"https:\/\/liangqi.org\"],\"url\":\"https:\/\/liangqi.org\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Tcp\/Ip\u5982\u4f55\u5de5\u4f5c \uff08Kafka producer\u673a\u5236\uff09 - Liangqi\u2018s Technical Journey","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/liangqi.org\/?p=219","og_locale":"en_US","og_type":"article","og_title":"Tcp\/Ip\u5982\u4f55\u5de5\u4f5c \uff08Kafka producer\u673a\u5236\uff09 - Liangqi\u2018s Technical Journey","og_description":"Application\u5982\u679c\u9700\u8981\u53d1\u9001\u6d88\u606f\uff0c\u662f\u5148\u53d1\u5230\u64cd\u4f5c\u7cfb\u7edf\u7684socket write buffer. \u5982\u679cbuffer\uff08queue\uff09\u6ee1\u4e86\uff0c\u5c31\u662ftcp congestion\u3002\u540c\u6837\u7684\uff0c\u5916\u90e8\u6765\u7684\u6d88\u606f\u4f1a\u5148\u5230\u64cd\u4f5c\u7cfb\u7edf\u7684socket receive buffer.\u5982\u679cbuffer\u6ee1\u4e86\uff0c\u64cd\u4f5c\u7cfb\u7edf\u5c31\u4e0d\u4f1aack\u90a3\u4e2a\u6d88\u606f\uff0c\u4e5f\u662fcongestion\u3002 \u8fd9\u4e2abuffer\u7684\u5c3a\u5bf8\u5e76\u4e0d\u5927\uff0c\u53ef\u4ee5\u901a\u8fc7\u4e00\u4e0b\u547d\u4ee4\u67e5\u8be2\u3002\u53c2\u6570\u5206\u522b\u4ee3\u8868,min, default, max: \u4e4b\u6240\u4ee5\u770b\u5230\u662f\u56e0\u4e3a\u770b\u8fd9\u7bc7\u6587\u7ae0http:\/\/cloudurable.com\/blog\/kafka-tutorial-kafka-producer-advanced-java-examples\/index.html#:~:text=The%20Kafka%20Producer%20has%20a,acks%20to%20control%20record%20durability. \u5982\u679cact\u662f0\uff0c\u90a3\u4e48application\u53ea\u662f\u628a\u6d88\u606f\u9001\u5230socket buffer\u5c31\u53ef\u4ee5\u4e86\u3002 \u8fd8\u6709\u4e00\u4e2a\u914d\u7f6e\u53c2\u6570 buffer.memory \u8fd9\u4e2a\u662fapplication level\u7684setting\uff0c\u5f53broker\u65e0\u6cd5\u8bbf\u95ee\uff0c\u5c31\u4f1a\u628a\u6d88\u606f\u653e\u5728\u5185\u5b58\u4e2d\u7b49\u5f85\uff0c\u5728 max.block.ms \u5230\u671f\u4e4b\u524d\uff0csend\u5c31\u4f1a\u7b49\u5f85\uff0c\u5230\u671f\u5c31\u4f1a\u629b\u4e00\u573a\u3002producer \u4e5f\u6709\u91cd\u8bd5\u673a\u5236\u3002 \u4f46\u662f\u8fd9\u91cc\u6709\u4e00\u4e2a\u7591\u95ee\uff0cbroker\u4e0d\u53ef\u8bbf\u95ee\uff0c\u662f\u4e0d\u662f\u64cd\u4f5c\u7cfb\u7edf\u7684socket write buffer\u4e5f\u4f1a\u6ee1\uff1f\u6211\u89c9\u5f97\u4e0d\u4f1a\uff0c\u5982\u679csocket buffer\u6ee1\u4e86\u5c31\u4f1a\u5f71\u54cd\u6240\u6709\u7684application\uff0c\u8fd9\u4e2a\u76f8\u5f53\u4e8e\u5916\u90e8\u7684\u4e00\u4e2a\u76ee\u6807\u65e0\u6cd5\u8bbf\u95ee\u5c31\u5bfc\u81f4\u6240\u6709\u7684\u5bf9\u5916\u8fde\u63a5\u5931\u6548\u3002\u5e94\u8be5\u662f\u6709\u4e00\u4e2a\u673a\u5236\u64cd\u4f5c\u7cfb\u7edf\u77e5\u9053\u5916\u90e8\u7f51\u7edc\u4e0d\u53ef\u9001\u8fbe\uff0c\u7136\u540e\u5c31\u4f1a\u6e05\u695a\u7f13\u5b58\uff0c\u544a\u8bc9application\u76ee\u6807\u4e0d\u53ef\u8fbe\uff0c\u7136\u540eapplication\u5c31\u4f1acache\u8bf7\u6c42\uff0c\u7136\u540e\u4e0d\u65ad\u7684\u91cd\u8bd5\u3002 https:\/\/stackoverflow.com\/questions\/49649241\/apache-kafka-batch-size-vs-buffer-memory","og_url":"https:\/\/liangqi.org\/?p=219","og_site_name":"Liangqi\u2018s Technical Journey","article_published_time":"2022-02-13T11:02:57+00:00","author":"liangqi","twitter_card":"summary_large_image","twitter_misc":{"Written by":"liangqi","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/liangqi.org\/?p=219#article","isPartOf":{"@id":"https:\/\/liangqi.org\/?p=219"},"author":{"name":"liangqi","@id":"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3"},"headline":"Tcp\/Ip\u5982\u4f55\u5de5\u4f5c \uff08Kafka producer\u673a\u5236\uff09","datePublished":"2022-02-13T11:02:57+00:00","dateModified":"2022-02-13T11:02:57+00:00","mainEntityOfPage":{"@id":"https:\/\/liangqi.org\/?p=219"},"wordCount":65,"commentCount":0,"publisher":{"@id":"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3"},"articleSection":["Kafka","\u6280\u672f"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/liangqi.org\/?p=219#respond"]}]},{"@type":"WebPage","@id":"https:\/\/liangqi.org\/?p=219","url":"https:\/\/liangqi.org\/?p=219","name":"Tcp\/Ip\u5982\u4f55\u5de5\u4f5c \uff08Kafka producer\u673a\u5236\uff09 - Liangqi\u2018s Technical Journey","isPartOf":{"@id":"https:\/\/liangqi.org\/#website"},"datePublished":"2022-02-13T11:02:57+00:00","dateModified":"2022-02-13T11:02:57+00:00","breadcrumb":{"@id":"https:\/\/liangqi.org\/?p=219#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/liangqi.org\/?p=219"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/liangqi.org\/?p=219#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/liangqi.org\/"},{"@type":"ListItem","position":2,"name":"Tcp\/Ip\u5982\u4f55\u5de5\u4f5c \uff08Kafka producer\u673a\u5236\uff09"}]},{"@type":"WebSite","@id":"https:\/\/liangqi.org\/#website","url":"https:\/\/liangqi.org\/","name":"Liangqi\u2018s Technical Journey","description":"Chasing Excellence; Enjoy life.","publisher":{"@id":"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/liangqi.org\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/liangqi.org\/#\/schema\/person\/105c89d9b783fda67b62e3ce113d6cd3","name":"liangqi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/liangqi.org\/#\/schema\/person\/image\/","url":"https:\/\/liangqi.org\/wp-content\/uploads\/2022\/01\/P1100089-3-scaled.jpg","contentUrl":"https:\/\/liangqi.org\/wp-content\/uploads\/2022\/01\/P1100089-3-scaled.jpg","width":2560,"height":1920,"caption":"liangqi"},"logo":{"@id":"https:\/\/liangqi.org\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/liangqi.org"],"url":"https:\/\/liangqi.org\/?author=1"}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/liangqi.org\/index.php?rest_route=\/wp\/v2\/posts\/219","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/liangqi.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/liangqi.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/liangqi.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/liangqi.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=219"}],"version-history":[{"count":2,"href":"https:\/\/liangqi.org\/index.php?rest_route=\/wp\/v2\/posts\/219\/revisions"}],"predecessor-version":[{"id":221,"href":"https:\/\/liangqi.org\/index.php?rest_route=\/wp\/v2\/posts\/219\/revisions\/221"}],"wp:attachment":[{"href":"https:\/\/liangqi.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=219"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/liangqi.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=219"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/liangqi.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=219"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}