Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 4805A200CD7 for ; Tue, 1 Aug 2017 23:10:18 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 4680C167F7C; Tue, 1 Aug 2017 21:10:18 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 6541D167F78 for ; Tue, 1 Aug 2017 23:10:17 +0200 (CEST) Received: (qmail 78160 invoked by uid 500); 1 Aug 2017 21:10:16 -0000 Mailing-List: contact dev-help@kafka.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kafka.apache.org Delivered-To: mailing list dev@kafka.apache.org Received: (qmail 78148 invoked by uid 99); 1 Aug 2017 21:10:15 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Aug 2017 21:10:15 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 29453C004A for ; Tue, 1 Aug 2017 21:10:15 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.878 X-Spam-Level: * X-Spam-Status: No, score=1.878 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=buckeyemail.osu.edu Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id RxnQn6VVNCJ0 for ; Tue, 1 Aug 2017 21:10:14 +0000 (UTC) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0106.outbound.protection.outlook.com [104.47.36.106]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id C88305F29A for ; Tue, 1 Aug 2017 21:10:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=buckeyemail.osu.edu; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=0ikLpfC41LiR6EPyawk1ZkvBxpykTsQskmrJdYzcX5Q=; b=jyNagxqsfeWUFKkElmRFtCZy5dIv6DInM4i6IfZoJo051K3giNC/CXF0qnsY0Z5W+ndRFXqXJlP2315yNOnv3ejkYI0vRpAmac7kx3BHTCQwGPeZXAexi5y832i1f6ZuKtpUVkkgFb2D3A6ZCMuKa5L4ibxje/MpxoOtb/4Ayd8= Received: from CY1PR01MB1408.prod.exchangelabs.com (10.163.18.30) by CY1PR01MB1405.prod.exchangelabs.com (10.163.18.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1304.22; Tue, 1 Aug 2017 21:10:06 +0000 Received: from CY1PR01MB1408.prod.exchangelabs.com ([10.163.18.30]) by CY1PR01MB1408.prod.exchangelabs.com ([10.163.18.30]) with mapi id 15.01.1304.023; Tue, 1 Aug 2017 21:10:06 +0000 From: "Javed, Haseeb" To: "dev@kafka.apache.org" Subject: Handler Threads in SocketServer Thread-Topic: Handler Threads in SocketServer Thread-Index: AQHTCwg+NPlE5i/FuEe1mwALK+16fA== Date: Tue, 1 Aug 2017 21:10:06 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=javed.19@buckeyemail.osu.edu; x-originating-ip: [140.254.204.139] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CY1PR01MB1405;20:KMAnCan1YNCJMu3BJLaluEl97WasuudcnvFmFJLdGVY0eST82L7mwyt8O82/YInIjkLwfjwXWkixL7AeJRuqPKPC3Rw70h0vGzFQxAUBiBB6kxQGDBgmF34/436bLW1U49SgRq0NLkNL9/qfVuESHAyrZMxQK9Md9sEjSTzch8M= x-ms-office365-filtering-correlation-id: 0dea7928-d61d-4a8f-6ada-08d4d921af4a x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(2017052603031)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:CY1PR01MB1405; x-ms-traffictypediagnostic: CY1PR01MB1405: x-exchange-antispam-report-test: UriScan:(158342451672863); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(3002001)(10201501046)(93006095)(93001095)(6041248)(20161123564025)(201703131423075)(201702281529075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123555025)(20161123560025)(20161123562025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY1PR01MB1405;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY1PR01MB1405; x-forefront-prvs: 0386B406AA x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39860400002)(39410400002)(39400400002)(39450400003)(39850400002)(39840400002)(199003)(189002)(14454004)(53936002)(7736002)(7696004)(3480700004)(6916009)(33656002)(68736007)(38730400002)(42882006)(6606003)(110136004)(8936002)(66066001)(55016002)(77096006)(105586002)(2351001)(5660300001)(106356001)(6436002)(54896002)(99286003)(54356999)(9686003)(19627405001)(5640700003)(101416001)(3846002)(102836003)(6506006)(50986999)(189998001)(2501003)(8676002)(88552002)(97736004)(74316002)(2906002)(86362001)(6116002)(3660700001)(81156014)(3280700002)(75432002)(25786009)(478600001)(2900100001)(81166006)(1730700003);DIR:OUT;SFP:1102;SCL:1;SRVR:CY1PR01MB1405;H:CY1PR01MB1408.prod.exchangelabs.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; received-spf: None (protection.outlook.com: buckeyemail.osu.edu does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: multipart/alternative; boundary="_000_CY1PR01MB14084F2479305FEDBE2945A4D2B30CY1PR01MB1408prod_" MIME-Version: 1.0 X-OriginatorOrg: buckeyemail.osu.edu X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Aug 2017 21:10:06.3495 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: eb095636-1052-4895-952b-1ff9df1d1121 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR01MB1405 archived-at: Tue, 01 Aug 2017 21:10:18 -0000 --_000_CY1PR01MB14084F2479305FEDBE2945A4D2B30CY1PR01MB1408prod_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello, I have recently started looking into the Kafka Server code to get a deeper = understanding of the internals and I have a few questions about the SocketS= erver implementation. The documentation for the SocketServer mentions: /** * The threading model is * 1 Acceptor thread that handles new connections * Acceptor has N Processor threads that each have their own selector and= read requests from sockets * M Handler threads that handle requests and produce responses back to t= he processor threads for writing. */ The Acceptor and Processor threads are implemented in the SocketServer and = I have a decent idea of how they operate. However, where exactly is the Han= dler thread defined? Is it the KafkaRequestHandler class in the package kaf= ka.server? If that is the case then what is the purpose of the Handler sing= eton object defined in the kafka.network package? Any help would be really appreciated. Haseeb --_000_CY1PR01MB14084F2479305FEDBE2945A4D2B30CY1PR01MB1408prod_--