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

fix(lambda): monitor lambda server, fix performance issue, remove lambda logs from extensions #8006

Merged
merged 8 commits into from
Sep 1, 2021

Conversation

NamanJain8
Copy link
Contributor

@NamanJain8 NamanJain8 commented Aug 30, 2021

By running lambda script in a new context adds a performance penalty.
This PR adds a health monitor in alpha that periodically pings lambda servers to check their responsiveness. The unresponsive lambda server ( configurable via --lambda=restart-after flag, default is10s) is restarted.
Also, this PR removes the lambda logs from the GraphQL response's extension. Instead they are spit out in alpha logs itself with prefix [LAMBDA-${ns}]


This change is Reviewable

@github-actions github-actions bot added area/graphql Issues related to GraphQL support on Dgraph. area/integrations Related to integrations with other projects. labels Aug 30, 2021
compose/compose.go Show resolved Hide resolved
dgraph/cmd/alpha/run.go Outdated Show resolved Hide resolved
go func(i int) {
for {
select {
case <-closer.HasBeenClosed():
break
return
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we will never reach here untill the process is running. I believe thats the expected behavior. Just wanted to point this out

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct. This is added so that alpha does not try to restart the lambda while the alpha is being shut down.

@NamanJain8 NamanJain8 merged commit 05a3958 into master Sep 1, 2021
@NamanJain8 NamanJain8 deleted the naman/fix-lambda branch September 1, 2021 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/graphql Issues related to GraphQL support on Dgraph. area/integrations Related to integrations with other projects.
Development

Successfully merging this pull request may close these issues.

2 participants