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

Implement HTTP header on invoke to determine elapsed time #25

Closed
alexandrebrg opened this issue May 13, 2023 · 0 comments · Fixed by #26 or morty-faas/cli#10
Closed

Implement HTTP header on invoke to determine elapsed time #25

alexandrebrg opened this issue May 13, 2023 · 0 comments · Fixed by #26 or morty-faas/cli#10
Assignees

Comments

@alexandrebrg
Copy link
Member

What needs to be done ?

Exclusively imply invocation of functions:

  • add header FUNCTION-RESPONSE-TIME in response, containing the execution time of the inner function
  • add header RIK-AVAILABLE-TIME in response, containing the time needed for RIK to be ready to serve the function
  • add header MORTY-RESPONSE-TIME in response, containing the whole time of the request (RIK + Function + Misc)

Why it needs to be done ?

In order to determine the time of execution of a function, we should have something to know how long did the invoke take. Currently, invoke of function returns directly the return statement of the content of the function, we can't change that as would create a breaking change. As an alternative, we found out that we can create HTTP headers in the response in order to give the details needed to solve this issue.

We want to be able to determine:

  • A: The execution time of the function
  • B: The time waiting for function instance to be ready to receive
  • C: The whole time of receiving the request + answering

In theory: C = A+B

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 💬 In Discuss
1 participant