Skip to content
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

Cached response is incomplete #15

Open
gauteh opened this issue Jan 22, 2020 · 4 comments
Open

Cached response is incomplete #15

gauteh opened this issue Jan 22, 2020 · 4 comments

Comments

@gauteh
Copy link

gauteh commented Jan 22, 2020

Hi, I am getting clipped responses when set up with nginx. First request looks good (using curl), but second gets part of the response clipped (typically last bit of ), docker-compose:

version: '3'

services:
  redis:
    image: redis
    restart: always

  dars:
    build: ../..
    volumes:
      - ../../data:/data:ro


  bloom:
    image: valeriansaliou/bloom:v1.28.0
    depends_on:
      - redis
      - dars
    volumes:
      - ./bloom-config.cfg:/etc/bloom.cfg:ro

  nginx:
    image: nginx
    depends_on:
      - bloom
    ports:
      - 8080:80
    volumes:
      - ./nginx:/etc/nginx:ro

ref: gauteh/dars#9

@valeriansaliou
Copy link
Owner

Do you have network traces (HTTP traces) to provide as examples?

@gauteh
Copy link
Author

gauteh commented Jan 24, 2020

No, I'm sorry, I'll see if I get the chance to do that. I do not have too much time to debug this, so I understand if you decide to close the issue.

@valeriansaliou valeriansaliou changed the title cached response incomplete Cached response is incomplete Jun 24, 2020
@squaresmile
Copy link

Here is the test file test.html I use and the bloom.cfg: https://gist.github.com/squaresmile/151efedc0ce86c3f4701ab11852238d6

The upstream is a simple basic python -m http.server serving the html file.

The first request without caching returns the test.html file correctly.

⋊> curl -H "Bloom-Request-Shard: 0" localhost:8080/test.html
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bloom test</title>
Bloom Test
More Bloom Test

The second request with caching returns the test.html missing "Test" at the end.

⋊> curl -H "Bloom-Request-Shard: 0" localhost:8080/test.html
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bloom test</title>
Bloom Test
More Bloom⏎ 

I queried the redis data directly and the data looks fine:

>>> print(brotli.decompress(data).decode("utf-8"))
HTTP/1.1 200 OK
Server: SimpleHTTP/0.6 Python/3.8.5
Content-Type: text/html
Content-Length: 178
Last-Modified: Tue, 06 Oct 2020 18:42:46 GMT

<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bloom test</title>
Bloom Test
More Bloom Test
bloom-server 1.29.0
Redis 6.0.6

@hendrikkiedrowski
Copy link

Just from what i read here, might it be that the Redis takes to long to serve the cached object?
Also i ran this in my development with dragonfly since its a lot faster and didnt notice this isse with around 10k req/m

Repository owner deleted a comment from Soumya6Tiwari Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants