Hey, I’m using Kubernetes + Linkerd2 to make a ‘pub-sub’ scenario inside a Kubernetes Cluster using Python with websockets, the Publisher side works fine, but the subscriber does not. The messages are generated every few seconds, but the subscriber only receives then every 3-4min and they arrive at once, then its ‘stuck/freeze’, then all msgs from the last 3-4min arrive… When I try to subscribre from outside the publisher/cluster (the publisher is exposed) it works like a charm.
---
apiVersion: v1
kind: Namespace
metadata:
name: linkerd-test
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
name: ui-backend-service
namespace: linkerd-test
spec:
replicas: 1
selector:
matchLabels:
app: ui-backend-svc
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: ui-backend-svc
spec:
containers:
- env:
image: tcnl/uibackend:3.6
name: ui-backend-svc
resources:
requests:
cpu: 300m
status: {}
---
apiVersion: v1
kind: Namespace
metadata:
name: linkerd-test
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
name: equipment-service
namespace: linkerd-test
spec:
replicas: 1
selector:
matchLabels:
app: equipment-svc
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: equipment-svc
spec:
containers:
- env:
- name: WEBSOCKET_PORT
value: "18000"
- name: HTTP_PORT
value: "18001"
image: tcnl/equipment:3.6
name: equipment-svc
ports:
- containerPort: 18000
name: websocket
- containerPort: 18001
name: http
resources:
requests:
cpu: 100m
status: {}
---
apiVersion: v1
kind: Service
metadata:
name: web-equip-svc
namespace: linkerd-test
spec:
type: LoadBalancer
selector:
app: equipment-svc
ports:
- name: http
port: 18001
targetPort: 18001
- name: websocket
protocol: TCP
port: 18000
targetPort: 18000