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 9BE67200C41 for ; Fri, 24 Mar 2017 19:11:49 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 9A7BE160B93; Fri, 24 Mar 2017 18:11:49 +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 DF972160B75 for ; Fri, 24 Mar 2017 19:11:48 +0100 (CET) Received: (qmail 31945 invoked by uid 500); 24 Mar 2017 18:11:47 -0000 Mailing-List: contact dev-help@phoenix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@phoenix.apache.org Delivered-To: mailing list dev@phoenix.apache.org Received: (qmail 31929 invoked by uid 99); 24 Mar 2017 18:11:47 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Mar 2017 18:11:47 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 3487DC0316 for ; Fri, 24 Mar 2017 18:11:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id tgJjJFBm7Cga for ; Fri, 24 Mar 2017 18:11:46 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 035765FC04 for ; Fri, 24 Mar 2017 18:11:46 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id E8A46E0059 for ; Fri, 24 Mar 2017 18:11:41 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 9E0AB21DD5 for ; Fri, 24 Mar 2017 18:11:41 +0000 (UTC) Date: Fri, 24 Mar 2017 18:11:41 +0000 (UTC) From: "James Taylor (JIRA)" To: dev@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PHOENIX-3654) Load Balancer for thin client MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 24 Mar 2017 18:11:49 -0000 [ https://issues.apache.org/jira/browse/PHOENIX-3654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15940848#comment-15940848 ] James Taylor commented on PHOENIX-3654: --------------------------------------- Thanks, [~rahulshrivastava]. Please amend your commit message to lead with the JIRA number: {code} git commit --amend -m "PHOENIX-3654 Load Balancer for thin client (Rahul Shrivastava)" {code} By including the JIRA number in the pull request, comments during code review will appear here on the JIRA as comments. > Load Balancer for thin client > ----------------------------- > > Key: PHOENIX-3654 > URL: https://issues.apache.org/jira/browse/PHOENIX-3654 > Project: Phoenix > Issue Type: New Feature > Affects Versions: 4.8.0 > Environment: Linux 3.13.0-107-generic kernel, v4.9.0-HBase-0.98 > Reporter: Rahul Shrivastava > Assignee: Rahul Shrivastava > Fix For: 4.9.0 > > Attachments: LoadBalancerDesign.pdf, Loadbalancer.patch > > Original Estimate: 240h > Remaining Estimate: 240h > > We have been having internal discussion on load balancer for thin client for PQS. The general consensus we have is to have an embedded load balancer with the thin client instead of using external load balancer such as haproxy. The idea is to not to have another layer between client and PQS. This reduces operational cost for system, which currently leads to delay in executing projects. > But this also comes with challenge of having an embedded load balancer which can maintain sticky sessions, do fair load balancing knowing the load downstream of PQS server. In addition, load balancer needs to know location of multiple PQS server. Now, the thin client needs to keep track of PQS servers via zookeeper ( or other means). > In the new design, the client ( PQS client) , it is proposed to have an embedded load balancer. > Where will the load Balancer sit ? > The load load balancer will embedded within the app server client. > How will the load balancer work ? > Load balancer will contact zookeeper to get location of PQS. In this case, PQS needs to register to ZK itself once it comes online. Zookeeper location is in hbase-site.xml. It will maintain a small cache of connection to the PQS. When a request comes in, it will check for an open connection from the cache. > How will load balancer know load on PQS ? > To start with, it will pick a random open connection to PQS. This means that load balancer does not know PQS load. Later , we can augment the code so that thin client can receive load info from PQS and make intelligent decisions. > How will load balancer maintain sticky sessions ? > While we still need to investigate how to implement sticky sessions. We can look for some open source implementation for the same. > How will PQS register itself to service locator ? > PQS will have location of zookeeper in hbase-site.xml and it would register itself to the zookeeper. Thin client will find out PQS location using zookeeper. -- This message was sent by Atlassian JIRA (v6.3.15#6346)