gateway icon indicating copy to clipboard operation
gateway copied to clipboard

API: Backend

Open guydc opened this issue 1 year ago • 10 comments

What this PR does / why we need it:

This is a preliminary API proposal for discussion purposes only. The new Backend API allows users to reference UDS, FQDN and IP backends with an alternative to the K8s Service resources. See design doc for more details.

Which issue(s) this PR fixes: Relates to #2997, #36

guydc avatar Mar 30 '24 00:03 guydc

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 67.14%. Comparing base (c4b0216) to head (5b69c70). Report is 1 commits behind head on main.

:exclamation: Current head 5b69c70 differs from pull request most recent head 3148915. Consider uploading reports for the commit 3148915 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3063      +/-   ##
==========================================
+ Coverage   66.97%   67.14%   +0.17%     
==========================================
  Files         164      165       +1     
  Lines       23882    23845      -37     
==========================================
+ Hits        15994    16011      +17     
+ Misses       6964     6916      -48     
+ Partials      924      918       -6     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Mar 30 '24 00:03 codecov[bot]

so these's something like ServiceEntry in Istio?

zirain avatar Mar 31 '24 04:03 zirain

@zirain, @Xunzhuo - There are some differences from ServiceEntry.

  • ServiceEntry doesn't support Unix Domain Sockets
  • You can route from VirtualService to external services by just specifying their address. You don't need a ServiceEntry for that, but a ServiceEntry allows you to configure some setting related to DNS resolution, (m)TLS, etc. In EG, this resource (or Service + FQDN Endpoint) is mandatory for external routing.

guydc avatar Apr 01 '24 10:04 guydc

LGTM. Thanks for adding this valuable API. It unlocks the full potential of EG, expanding it to many more use cases outside of Kubernetes!

Defer to other @envoyproxy/gateway-maintainers

zhaohuabing avatar May 10 '24 21:05 zhaohuabing

will this help https://gateway.envoyproxy.io/v1.0.1/tasks/traffic/routing-outside-kubernetes/ without using service/endpointslice?

zirain avatar May 13 '24 20:05 zirain

will this help https://gateway.envoyproxy.io/v1.0.1/tasks/traffic/routing-outside-kubernetes/ without using service/endpointslice?

yes this API is a better approach to do non k8s routing

arkodg avatar May 13 '24 20:05 arkodg

will this help https://gateway.envoyproxy.io/v1.0.1/tasks/traffic/routing-outside-kubernetes/ without using service/endpointslice?

yes this API is a better approach to do non k8s routing

@guydc is this scenario in your plan?

zirain avatar May 13 '24 21:05 zirain

will this help https://gateway.envoyproxy.io/v1.0.1/tasks/traffic/routing-outside-kubernetes/ without using service/endpointslice?

yes this API is a better approach to do non k8s routing

@guydc is this scenario in your plan?

I'm targeting two scenarios:

  • Simplify routing to out-of-cluster endpoints (for xRoutes and other backendRefs), as you mention
  • Support unix domain socket communication for reduced latency to extension servers (Ext Auth, Ext Proc, RL, Telemetry sinks.. )

I don't intend to implement support for Backend everywhere immediately. I'll start out with HTTPRoutes and ExtProc support for Backend referencing. I hope that that other use cases will be implemented gradually based on requirement from users.

guydc avatar May 13 '24 22:05 guydc

/retest

guydc avatar May 13 '24 22:05 guydc

/retest

guydc avatar May 14 '24 12:05 guydc

/retest

guydc avatar May 15 '24 19:05 guydc