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

Document known problems #6

Open
dgzlopes opened this issue Jun 22, 2023 · 1 comment
Open

Document known problems #6

dgzlopes opened this issue Jun 22, 2023 · 1 comment

Comments

@dgzlopes
Copy link
Member

dgzlopes commented Jun 22, 2023

QuickPizza isn't perfect! It has a few problems:

  • Backend:
    • If too many HTTP requests hit the service, latency grows to the sky.
    • Name generation is unpredictable and slow.
    • In-memory database should store only the last ten pizza recommendations, but it stores them all.
    • If requirements are too strict and can't be fulfilled, we return a random recommendation after a few tries.
      • Type? Functional issue.
      • Why? This edge case isn't handled properly.
      • How to find it? With Checks/Thresholds.
      • How to fix it? If a good recommendation can't be generated, return an error.
  • Frontend:
    • If the recommendations API is under load, no feedback is given to the user (e.g., loading spinner)
      • And they can retry manually as many times as they want (putting even more load on the backend)
Peek.2023-06-22.14-08.mp4
  • The Quotes API blocks rendering.
Peek.2023-06-22.15-08.mp4
@dgzlopes dgzlopes self-assigned this Jun 22, 2023
@dgzlopes dgzlopes changed the title Document known failures Document known problems Jun 22, 2023
@dgzlopes dgzlopes removed their assignment Jun 22, 2023
@RafalSkolasinski
Copy link

I am just going through materials in this repo and https://github.com/grafana/k6-oss-workshop.

I noticed that if set vus and durations to larger numbers then quickpizza becomes defunct.
Basically the replies are empty and see a lot of errors/warnings in logs like

quickpizza-1  | time=2024-12-02T21:55:37.638Z level=WARN msg="failed to perform db query" operation=INSERT duration=6.959µs query="INSERT INTO \"pizza_to_ingredients\" (\"pizza_id\", \"ingredient_id\") VALUES (101, 2)" err="constraint failed: UNIQUE constraint failed: pizza_to_ingredients.pizza_id, pizza_to_ingredients.ingredient_id (1555)"

quickpizza-1  | time=2024-12-02T21:55:37.639Z level=ERROR msg="Storing recommendation in catalog" err="making http request: Post \"http://localhost:3333/api/internal/recommendations\": POST http://localhost:3333/api/internal/recommendations giving up after 1 attempt(s)" user=23423

and remains unavailable until I restart it with docker compose restart quickpizza.

Is that also known issue? In seems that in this context most of examples / workshop materials are broken.

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

2 participants