Closed jensg-st closed 1 year ago
I don't know exactly what's going on here.
Can you provide more information? For example, what is your server?
In addition, I suggest that you can use tcpdump
to capture packets to check whether there is any difference when using APISIX and NGINX.
FYI:
Thank you for replying. I kind of figured out what the issue is/was. We have some problems with Ubuntu hosts and the centos7 image you are using (#1602) and we don't need Hong Kong timezone for our images.
Because of the DNS issue we had with the image we did build our own image based on Ubuntu 22.04. I don't know what the issue with that base image is but it had this TCP "hang". We decided now to use Rocky Linux as base image for the ingress controller because it is basically one of the successors of Centos. That works like a charm. Thanks again.
Use the stream_timeout
option to configure Apisix to send the SMTP Service response after the connection is established.
_Default value of streamtimeout is 10 sec.
gateway:
type: LoadBalancer
tls:
enabled: true
sslProtocols: "TLSv1 TLSv1.1 TLSv1.2"
stream:
enabled: true
tcp:
- 2525
timeout: 2
Issue description
We are trying to replace nginx ingress controller with apisix but we are experiencing an issue with TCP streaming. We want to proxy SMTP via apisix and the behaviour is different from nginx ingress controller. It might be a apure apisix question or nginx configuration thing.
With nginx we configured the helm chart like that as an example:
This worked perfectly fine.
Now we are configuring the ingress controller in regards to TCP like this:
This opens port 2525 on the gateway side and on apisix. With a route we are adding the backend service.
The problem here is the behaviour of the proxy itself I'm assuming. With nginx ingress controller or port-forwarding to the service we are getting the following:
With apisix it seems the connection "hangs" till the first data or command is set:
As you can see, the
ESMTP Service Ready
comes AFTER sending the first data to the service. Is there a configuration I need to add so the data is getting send immediately? This breaks every SMTP client which considers this service not as SMTP service.Environment