unleash icon indicating copy to clipboard operation
unleash copied to clipboard

POST endpoint for the proxy/frontend api

Open omarzouk opened this issue 2 years ago • 3 comments

Describe the feature request

Would it be possible to add a POST endpoint that accepts context parameters as json data?

Background

Using the GET endpoint with large contexts forces a change in the network infrastructure to allow large request headers which is not always desirable. Also, having to urlencode all variables adds an unnecessary complexity. It adds a limitation to the size of the context that doesn’t really need to be there.

Solution suggestions

Add a POST endpoint to proxy/frontend API

omarzouk avatar Aug 30 '23 09:08 omarzouk

Hi @omarzouk - Thank you for raising this issue! I'll reach out to the rest of the team and get back to you.

nunogois avatar Sep 04 '23 13:09 nunogois

Hey @omarzouk! I think this probably makes sense to add, can't promise you a timeline though. I'll have to have a quick huddle with the team that built this tomorrow to see if they have any objections but I can't see any off the top of my head.

That being said, I would generally suggest you treat the proxy/frontend endpoint as an experimental starting point rather than something to scale out against. Using really large contexts suggests that you're already hitting the sane limits of using this. Have you considered using Edge (https://github.com/Unleash/unleash-edge)? This handles scale a whole bunch better and already supports the POST endpoint you want. It's a whole bunch better for privacy as well

You also mention that it's a pain to URL encode the parameters, usually the proxy SDKs will do that for you, which I recommend using since they'll make sure metrics get handled correctly.

sighphyre avatar Sep 04 '23 14:09 sighphyre

Using really large contexts suggests that you're already hitting the sane limits of using this. Have you considered using Edge (https://github.com/Unleash/unleash-edge)? This handles scale a whole bunch better and already supports the POST endpoint you want.

I think the fastest, and probably the most robust solution would to consider edge for now.

ivarconr avatar Feb 15 '24 19:02 ivarconr