This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-09-25
Channels
- # announcements (5)
- # babashka (2)
- # beginners (36)
- # bristol-clojurians (3)
- # calva (26)
- # cider (11)
- # clj-kondo (26)
- # cljfx (5)
- # cljsrn (7)
- # clojure (149)
- # clojure-berlin (13)
- # clojure-czech (1)
- # clojure-dev (6)
- # clojure-europe (50)
- # clojure-france (2)
- # clojure-italy (9)
- # clojure-nl (4)
- # clojure-uk (48)
- # clojured (1)
- # clojuredesign-podcast (4)
- # clojurescript (27)
- # core-async (3)
- # cursive (5)
- # data-science (1)
- # datalog (1)
- # datomic (32)
- # emacs (8)
- # events (1)
- # fulcro (19)
- # graalvm (2)
- # graphql (7)
- # jobs (1)
- # malli (5)
- # meander (36)
- # nrepl (2)
- # parinfer (2)
- # pedestal (14)
- # reagent (4)
- # reitit (2)
- # reveal (7)
- # specter (4)
- # tools-deps (6)
- # uncomplicate (1)
- # vrac (2)
- # xtdb (12)
Hello, everyone how to deal with sharp latency increases during load in pedestal jetty based server? When querying db and sending large json response to 1 request latency is around 700ms, and as i increase requests to 15-25 per second response times grow to 16-27s, how to deal with this? (Standard settings, prod mode, full async and nio)
can you exemplify this?
Did you use time
macro to check if this time is from j/query or any other component?
You are using json? cheshire? how do you benchmark it?
Also yeah, i used time to look for handler time, it uses fixedthreadpool for queries and does a bit of mapping, the time it takes to complete handler takes 450-550ms
What the request does? Are you sure that your operation isn't blocking the async threads?
Queries are submitted to a fixedsizethreadpool that returns a chan on completion, other than that nothing blocking
Is there anything built into pedestal to let the client specify keys? /posts/42?fields=subject,author_name
kind of thing
writing an interceptor but also curious if anything is already baked in
@christian.gonzalez you end up re-writting (a part of) graphql
@souenzzo true 😂
#pathom has a "nested select-keys", that may help you https://blog.wsscode.com/pathom/v2/pathom/2.2.0/other-helpers.html
thank you! checking that out, not sure yet if i need to specify nested keys