Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4740

Haproxy performance with grpc in responding

$
0
0

@debabrata.debroy wrote:

I am doing measurement of grpc by sending around 640MB data from grpc server. when my grpc client directly querying for data to grpc i am getting these 640MB within 700 ms. But when I am passing the request over HAProxy its turning out to be 1400 ms

From the haproxy logs it seems that Haproxy is getting request with grpc encoding as grpc . But in my code i have not set any encoding.

If I directly send request from grpc client to grpc server I can see this encoding is not present in http header.

HAProxy logs ->>>>>>>>>>

00000005:f_h2c.clireq[001e:ffffffff]: POST http://com.mycompany/com.mycompany.myproto.EchoService/echo HTTP/2.0
00000005:f_h2c.clihdr[001e:ffffffff]: content-type: application/grpc
00000005:f_h2c.clihdr[001e:ffffffff]: te: trailers
00000005:f_h2c.clihdr[001e:ffffffff]: user-agent: grpc-java-netty/1.19.0
00000005:f_h2c.clihdr[001e:ffffffff]: grpc-accept-encoding: gzip
00000005:f_h2c.clihdr[001e:ffffffff]: grpc-timeout: 4706532u
00000005:f_h2c.clihdr[001e:ffffffff]: host: com.mycompany
00000005:local_node.srvrep[001e:001f]: HTTP/2.0 200
00000005:local_node.srvhdr[001e:001f]: content-type: application/grpc
00000005:local_node.srvhdr[001e:001f]: grpc-encoding: identity
00000005:local_node.srvhdr[001e:001f]: grpc-accept-encoding: gzip
00000005:local_node.srvcls[001e:001f]

Is there any way to disable this gzip for Grpc in HaProxy side.

here is the config I am using

global
debug
defaults
log global
timeout connect 10s
timeout client 30s
timeout server 30s
option logasap
option http-use-htx

frontend f_h2c
mode http
option http-use-htx
bind *:9211 proto h2

acl is_domain hdr_dom(host) -i m1ycompany

use_backend local_node if is_domain

default_backend local_node

backend local_node
mode http

option http-keep-alive

option forwardfor

http-request set-header X-Forwarded-Port %[dst_port]

http-request add-header X-Forwarded-Proto https if { ssl_fc }

#balance source
#balance hdr(user_id)
default-server inter 1s fall 1
 server server1 10.204.11.33:8086 check   proto h2
server server2   10.204.11.33:8085 check   backup proto h2

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4740

Trending Articles