Skip to content

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

Description

@kayx23

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

Metadata

Metadata

Assignees

Type

No type

Projects

Status
✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions