Fork me on GitHub
#graphql
<
2020-02-10
>
chrisulloa20:02:22

What is the major difference between using lacinia-pedestal with async enabled, and just using async resolvers?

chrisulloa20:02:44

Does async enabled with lacinia-pedestal mean that even non-async resolvers get called async?

chrisulloa20:02:23

I would imagine just using async resolvers gives you full control over what is executed synchronously and what’s not.

hiredman20:02:13

I think async resolvers effect behavior internally in lacinia (it effects things like the ability to resolve fields concurrent lu) and async for lacinia-pedestal effects the behavior at the boundary between lacinia and pedestal (does pedestal block and wait for lacinia to return something, or does it treat it as async)

chrisulloa21:02:02

thanks that makes a lot more sense

hlship21:02:24

tl;dr; using lacinia-pedestal w/ async enabled frees the request processing thread while Lacinia is executing the query. Normally, the request processing thread is blocked while Lacinia is doing its thing.

8
hlship21:02:58

So, in theory, you can handle higher levels of traffic with the same number of threads BUT you might find yourself cpu bound by doing so.

chrisulloa22:02:20

i see, that makes sense. there is a warning that the service might become oversaturated if enabled and not rate limited.