I am trying to do a very basic setup of Envoy for load balancing and discovery features of my GRPC services. Say for a very basic setup i have two GRPC services running in Docker containers. According to Envoy docs i should use "envoy.tcp_proxy" filter type. Here i make a very simple yml configuration that fails to run:
admin:
access_log_path: /tmp/admin_access.log
address:
socket_address: { address: 0.0.0.0, port_value: 9901 }
static_resources:
listeners:
- name: listener_0
address:
socket_address: { address: 0.0.0.0, port_value: 10000, protocol: TCP }
filter_chains:
- filters:
- name: envoy.tcp_proxy
config:
stat_prefix: myservice
cluster: mycluster
clusters:
- name: mycluster
connect_timeout: 0.25s
type: LOGICAL_DNS
# Comment out the following line to test on v6 networks
dns_lookup_family: V4_ONLY
lb_policy: ROUND_ROBIN
hosts: [{ socket_address: { address: localhost, port_value: 30270 }}]
tls_context: { sni: localhost }
Apparently i am doing something wrong, but cant find a complete GRPC to GRPC service mesh Envoy configuration example anywhere on the site. Port 30270 is the one i expose and listen on server side.
Given above configuration says:
error initializing configuration '/etc/envoy.yaml': envoy.tcp_proxy factory returned nullptr instead of empty config message
Do i still have to use HTTP manager to route? Could anybody share an example?