Draft
Conversation
fulmicoton-dd
commented
Jan 28, 2026
| }) | ||
| .collect(); | ||
|
|
||
| let responses = try_join_all(lambda_tasks).await?; |
fulmicoton-dd
commented
Jan 28, 2026
fulmicoton-dd
commented
Jan 28, 2026
| Self { | ||
| memory_mb, | ||
| fast_field_cache_capacity, | ||
| split_footer_cache_capacity, |
Collaborator
Author
There was a problem hiding this comment.
that's not useful.
fulmicoton-dd
commented
Jan 28, 2026
| /// Create a Lambda-optimized searcher config based on the allocated memory. | ||
| pub fn for_memory(memory_mb: usize) -> Self { | ||
| // Allocate roughly 1/4 of memory to fast field cache | ||
| let fast_field_cache_capacity = ByteSize::mb((memory_mb / 4) as u64); |
Collaborator
Author
There was a problem hiding this comment.
that's not useful.
fac4b59 to
2a2cc95
Compare
6b07375 to
9be04dc
Compare
Key Technical Components
1. ExecutionMode enum in protobuf - Added GRPC and REMOTE_FUNCTION variants to
SearchRequest
2. RemoteFunctionInvoker trait - Cloud-agnostic interface for function invocation
3. AwsLambdaInvoker - AWS Lambda implementation using the Lambda SDK
4. LambdaConfig - Configuration (enabled, function_name,
max_splits_per_invocation, etc.)
Files Modified
File: quickwit-search/src/root.rs
Changes: Lambda routing logic in search_partial_hits_phase(), added
execute_leaf_search_via_lambda() function
────────────────────────────────────────
File: quickwit-search/src/service.rs
Changes: Added lambda_invoker field to SearchServiceImpl
────────────────────────────────────────
File: quickwit-search/src/lib.rs
Changes: Updated start_searcher_service to accept lambda_invoker
────────────────────────────────────────
File: quickwit-serve/src/lib.rs
Changes: Initialize AwsLambdaInvoker when Lambda is enabled
────────────────────────────────────────
File: quickwit-serve/Cargo.toml
Changes: Added quickwit-lambda dependency
────────────────────────────────────────
File: quickwit-lambda/*
Changes: New crate with invoker, handler, and config
Architecture
- Lambda routing logic placed in search_partial_hits_phase() function
- Split batching for Lambda invocations based on max_splits_per_invocation
- Lambda invoker passed through: root_search → root_search_aux →
search_partial_hits_phase_with_scroll → search_partial_hits_phase
- Base64-encoded protobuf payloads for Lambda communication
Lambda Configuration
The Lambda feature is configured in the searcher section of your Quickwit node
config:
searcher:
lambda:
# Enable Lambda execution mode for leaf search
enabled: true
# AWS Lambda function name or ARN (required when enabled)
function_name: "quickwit-leaf-search"
# Optional function qualifier (alias or version)
function_qualifier: "prod" # optional
# Maximum number of splits per Lambda invocation (default: 10)
max_splits_per_invocation: 10
# Timeout for Lambda invocations in seconds (default: 60)
invocation_timeout_secs: 60
# Maximum number of concurrent Lambda invocations (default: 100)
max_concurrent_invocations: 100
Triggering Lambda Mode
To use Lambda for a search request, set execution_mode to REMOTE_FUNCTION in the
SearchRequest protobuf, or use the appropriate query parameter/header in the REST
API.
Lambda Handler
The Lambda function should be built from the quickwit-lambda crate's leaf_search
binary, which:
- Receives base64-encoded protobuf LeafSearchRequest
- Returns base64-encoded protobuf LeafSearchResponse
- Auto-configures cache sizes based on Lambda memory allocation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.