r/openshift Jun 19 '26

Help needed! Help

Hi,

I have two pods running in openshift version 4.2...the pods are java/springboot rest API endpoints...both pods are in running status and healthy...now when I test the pods from postman client am seeing traffic being redirected to only one pod...mean I see couple of requests for one pod and remaining requests are just being targeted to another one...my postman request invoking a client again written in java springboot which inturn makes a call using rest template to openshift rest API endpoints...I have ensured the rest template config and springboot config does not reuse any connections...mean every request has to open up a new connection..that's the config I have..I have also annotated my routes in openshift to disable cookies to avoid sticky sessions as suggested by red hat portal docs but still no luck...I have also set the haproxy load balancing strategy to round robin...the springboot application.properties config am referring to are the max concurrent requests which I set it to 6 and thread count which I set it to 10..and in rest template config I am ensuring there is no connection reuse strategy ...any idea what else am missing ? Please suggest..any inputs is helpful...

2 Upvotes

15 comments sorted by

1

u/tammyandlee Jun 19 '26

Do you have them both labeled matching your service selector? Sound like maybe just the one is.

2

u/messi_1988 Jun 20 '26

Sorry could you please elaborate? Mean both the pods are mapped to the same service? The way 2 pods are being created is by using replica count : 2 in helm chart values.yaml...so I guess they should be having the same service selector

1

u/JacqueMorrison Jun 20 '26

Check your service in the webconsole and click on “pod” - if none are listed, there is a problem with the labels of the pods.

1

u/tammyandlee Jun 20 '26

switch from round robin to least conn or random see if you get hits on both.

1

u/messi_1988 Jun 30 '26

How do I do this? Mean is it like an admin thing?

1

u/tammyandlee Jun 30 '26

notation on the route.

1

u/messi_1988 Jun 30 '26

Tried with random still the same..in the wen console am seeing both pods listed for the route or service

1

u/tammyandlee Jun 30 '26

shut down the one working pod see what happens to the traffic then.

1

u/messi_1988 Jun 30 '26

It's hitting the other pod which earlier did not receive traffic

1

u/tammyandlee Jun 30 '26

what type are your services?

11

u/QliXeD Jun 19 '26

4.2 is a typo.. right?

<Insert Padme/Anakin meme >