-
Notifications
You must be signed in to change notification settings - Fork 490
Snapstart Minimal API Performance Improvements #2010
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
Snapstart Minimal API Performance Improvements #2010
Conversation
Libraries/src/Amazon.Lambda.RuntimeSupport/Client/RuntimeApiHeaders.cs
Outdated
Show resolved
Hide resolved
...mbda.AspNetCoreServer.Hosting/Internal/LambdaSnapstartExecuteRequestsBeforeSnapshotHelper.cs
Outdated
Show resolved
Hide resolved
Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/Internal/LambdaRuntimeSupportServer.cs
Outdated
Show resolved
Hide resolved
520905f
to
784e195
Compare
Libraries/src/Amazon.Lambda.RuntimeSupport/Amazon.Lambda.RuntimeSupport.csproj
Outdated
Show resolved
Hide resolved
Ran the AWS CI PR check manually https://github.com/aws/aws-lambda-dotnet/actions/runs/13835574482/job/38709627134 |
...ies/src/Amazon.Lambda.AspNetCoreServer.Hosting/Amazon.Lambda.AspNetCoreServer.Hosting.csproj
Outdated
Show resolved
Hide resolved
Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/Internal/LambdaRuntimeSupportServer.cs
Show resolved
Hide resolved
...mbda.AspNetCoreServer.Hosting/Internal/LambdaSnapstartExecuteRequestsBeforeSnapshotHelper.cs
Outdated
Show resolved
Hide resolved
...mbda.AspNetCoreServer.Hosting/Internal/LambdaSnapstartExecuteRequestsBeforeSnapshotHelper.cs
Outdated
Show resolved
Hide resolved
...mbda.AspNetCoreServer.Hosting/Internal/LambdaSnapstartExecuteRequestsBeforeSnapshotHelper.cs
Outdated
Show resolved
Hide resolved
...mbda.AspNetCoreServer.Hosting/Internal/LambdaSnapstartExecuteRequestsBeforeSnapshotHelper.cs
Outdated
Show resolved
Hide resolved
Libraries/src/Amazon.Lambda.RuntimeSupport/Amazon.Lambda.RuntimeSupport.csproj
Outdated
Show resolved
Hide resolved
...mbda.AspNetCoreServer.Hosting/Internal/LambdaSnapstartExecuteRequestsBeforeSnapshotHelper.cs
Outdated
Show resolved
Hide resolved
fa3658e
to
fc98552
Compare
c7d6057
to
b476fcd
Compare
Libraries/src/Amazon.Lambda.RuntimeSupport/Amazon.Lambda.RuntimeSupport.csproj
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My reading is there are 2 different solutions being implemented here. One for AspNetCoreServer.Hosting and one for just using AspNetCoreServer. I would rather we not have different solutions and it seems like the subclasses in AspNetCoreServer.Hosting could override the virtual method for getting the list or requests to run and the service collection extension method could provide a way to get the request into that collection returned in the override.
Plus if you do it that way you can remove any changes you did to RuntimeSupport.
Libraries/src/Amazon.Lambda.AspNetCoreServer/Amazon.Lambda.AspNetCoreServer.csproj
Outdated
Show resolved
Hide resolved
Libraries/src/Amazon.Lambda.AspNetCoreServer/Internal/HttpRequestMessageSerializer.cs
Outdated
Show resolved
Hide resolved
Libraries/src/Amazon.Lambda.AspNetCoreServer/Internal/HttpRequestMessageSerializer.cs
Outdated
Show resolved
Hide resolved
Libraries/src/Amazon.Lambda.AspNetCoreServer/Internal/HttpRequestMessageSerializer.cs
Outdated
Show resolved
Hide resolved
Libraries/src/Amazon.Lambda.AspNetCoreServer/Internal/HttpRequestMessageSerializer.cs
Outdated
Show resolved
Hide resolved
Libraries/src/Amazon.Lambda.AspNetCoreServer/AbstractAspNetCoreFunction.cs
Outdated
Show resolved
Hide resolved
Libraries/src/Amazon.Lambda.AspNetCoreServer/AbstractAspNetCoreFunction.cs
Outdated
Show resolved
Hide resolved
Libraries/src/Amazon.Lambda.AspNetCoreServer/Internal/SnapStartEmptyLambdaContext.cs
Outdated
Show resolved
Hide resolved
Libraries/src/Amazon.Lambda.AspNetCoreServer/Internal/SnapStartEmptyLambdaContext.cs
Outdated
Show resolved
Hide resolved
0d66f1c
to
7915449
Compare
…et/lambda pipelines automatically during BeforeSnapshot callback.
…ing calls to HttpClient
…dependency on RuntimeSupport
da5a6e6
to
2297048
Compare
I have unified the 2 approaches so now |
2321527
to
8a6bb71
Compare
Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/ServiceCollectionExtensions.cs
Outdated
Show resolved
Hide resolved
Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/ServiceCollectionExtensions.cs
Outdated
Show resolved
Hide resolved
Libraries/src/Amazon.Lambda.AspNetCoreServer/Internal/HttpRequestMessageConverter.cs
Outdated
Show resolved
Hide resolved
Libraries/src/Amazon.Lambda.AspNetCoreServer/Internal/SnapStartEmptyLambdaContext.cs
Outdated
Show resolved
Hide resolved
Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/ServiceCollectionExtensions.cs
Outdated
Show resolved
Hide resolved
Libraries/src/Amazon.Lambda.AspNetCoreServer/AbstractAspNetCoreFunction.cs
Show resolved
Hide resolved
Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/ServiceCollectionExtensions.cs
Outdated
Show resolved
Hide resolved
Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/ServiceCollectionExtensions.cs
Show resolved
Hide resolved
Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/ServiceCollectionExtensions.cs
Outdated
Show resolved
Hide resolved
Libraries/src/Amazon.Lambda.AspNetCoreServer/AbstractAspNetCoreFunction.cs
Show resolved
Hide resolved
8a6bb71
to
a35a55a
Compare
Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/ServiceCollectionExtensions.cs
Outdated
Show resolved
Hide resolved
Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/Internal/LambdaRuntimeSupportServer.cs
Outdated
Show resolved
Hide resolved
Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/ServiceCollectionExtensions.cs
Outdated
Show resolved
Hide resolved
Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/ServiceCollectionExtensions.cs
Outdated
Show resolved
Hide resolved
Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/ServiceCollectionExtensions.cs
Show resolved
Hide resolved
Libraries/src/Amazon.Lambda.AspNetCoreServer/AbstractAspNetCoreFunction.cs
Show resolved
Hide resolved
Libraries/src/Amazon.Lambda.AspNetCoreServer/AbstractAspNetCoreFunction.cs
Outdated
Show resolved
Hide resolved
a35a55a
to
362aa2e
Compare
362aa2e
to
d5780f3
Compare
Issue #, if available:
It is not feasible for users to warm up the asp.net and lambda pipelines via
SnapshotRestore.RegisterBeforeSnapshot
when using .NET MinimalAPI Lambda.Description of changes:
Creates a new extension method,
AddAWSLambdaBeforeSnapshotRequest
that allows users to add a function meant to initialize the asp.net and lambda pipelines duringSnapshotRestore.RegisterBeforeSnapshot
, improving the performance gains offered by SnapStart.Example:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.