Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

discussion: refactor L4 and/or L7 Proxy Enablement #9600

Closed
kayx23 opened this issue Jun 5, 2023 · 4 comments · Fixed by #9607
Closed

discussion: refactor L4 and/or L7 Proxy Enablement #9600

kayx23 opened this issue Jun 5, 2023 · 4 comments · Fixed by #9607
Assignees

Comments

@kayx23
Copy link
Member

kayx23 commented Jun 5, 2023

Description

Enable L4 and/or L7 proxies in APISIX are currently somewhat confusing for users.

Previous discussion in the mailing list can be found here: https://lists.apache.org/thread/w8681qbk3x9n9s4y6mrhcp18yzhddgyr

Opening this issue for tracking.

To summarize the discussion:

Current logic:

  1. To enable only the L7 proxy
    This is the default configuration
  2. To enable both L7 & L4 proxy
    enable apisix.stream_proxy
  3. To enable only the L4 proxy
    enable apisix.stream_proxy and set enable_admin = false (not easy to understand)

NOTICE: The above mode is the operation of APISIX in the traditional mode (the default enable_admin is true).

If the user changes the mode of APISIX to control plane (at this time enable_admin is false by default), the above three become:

  1. To enable only the L7 proxy
    This is the default configuration
  2. To enable both L7 & L4 proxy
    enable apisix.stream_proxy and set apisix.stream_proxy.only = false
  3. To enable only the L4 proxy
    enable apisix.stream_proxy and set apisix.stream_proxy.only = true

Proposed solution:

Add a configuration and remove apisix.stream_proxy.only:

  • proxy_mode: http or stream or http&stream

This has nothing to do with enable_admin.

  1. To enable only the L7 proxy
    This is the default configuration
  2. To enable both L7 & L4 proxy
    set apisix.proxy_mode = http&stream
  3. To enable only the L4 proxy
    set apisix.proxy_mode = stream

Environment

APISIX: current version is 3.2.1

@kayx23 kayx23 changed the title Discussion: Enable L4 and/or L7 Proxy discussion/refactor: Enable L4 and/or L7 Proxy Jun 5, 2023
@Revolyssup
Copy link
Contributor

@kayx23 Can I take this item?

@kayx23
Copy link
Member Author

kayx23 commented Jun 6, 2023

Please chat with @leslie-tsang or @monkeyDluffy6017 about this, thanks

@monkeyDluffy6017
Copy link
Contributor

This is a break change, we need to discuss this in more detail.
What about your opinion? @kingluo @leslie-tsang

@kayx23 kayx23 changed the title discussion/refactor: Enable L4 and/or L7 Proxy discussion: refactor L4 and/or L7 Proxy Enablement Jun 8, 2023
@monkeyDluffy6017
Copy link
Contributor

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants