- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to workaround acquired empty meta value from cache #25
Comments
The metadata key looks like this one: Can you please share the raw HTTP response of the request that you'd like cached / which doesnt get cached, from your API? I'd need full HTTP response w/ headers and body. |
Hello, yes of course. Sorry for late recall, I was busy on the other things and I need to simulate it on the server. Here is my response headers (body is just plain JSON)
Follows just raw json data. This is my Bloom log from first request on this URL, second follows with headers I pasted here.
Thanks for the help. |
I don’t see any Bloom header on your request. Did you set them somewhere? It needs to be set at the reverse proxy level so that Bloom knows which upstream to route to and what to do. |
Yes, my location in nginx has What I posted you is response from server, and you can see bloom-status: MISS. I also try to set headers in my API (code below) When I go to route where is caching turned off it sets proper bloom-status to DIRECT. This is my fairing for Rocket:
And this is my CORS settings:
If I hit notices I get DIRECT as status, so I think processing works, I had also HIT once but I was unable to repeat it, I don't see what I am getting wrong :(. EDIT: removes unnecessary comments |
Hello there,
I like your idea very much. I would love to use bloom server as a cache for my backend JSON REST API written in Rust. But I am unable to make it work. I spent an hours trying, but no idea. I have prepared my environment for testing on Debian Linux (Buster).
I have installed bloom server using
cargo install bloom-server
, now I havebloom-server 1.35.2
installed (output from bloom -V).My redis version is 7.0.11-1rl1~buster1. Configured accordingly to your example config (also used for another caching, so I use different database number, as you will se later).
This is my bloom config:
My nginx is proxy passing this way:
Before there are also CORS setups (also carefully modified by your docs) but my issue is not here, because I can get my data.
Problem is, that I am missing the cache. Header Bloom-Status is MISS still. I tried to add the headers from my API Bloom-Response-TTL or without. Everything is cached into redis (keys are visible) but then I got an error. This is Bloom log (INFO level)
In my redis database I can see:
etc. these logs are from history not in the same moment. I am trying to figure it out.
Please have you any suggestion? I would like to have Bloom working for me.
Thanks
The text was updated successfully, but these errors were encountered: