Skip to content

Lambda#6123

Draft
fulmicoton-dd wants to merge 18 commits intomainfrom
lambda
Draft

Lambda#6123
fulmicoton-dd wants to merge 18 commits intomainfrom
lambda

Conversation

@fulmicoton-dd
Copy link
Collaborator

No description provided.

})
.collect();

let responses = try_join_all(lambda_tasks).await?;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

retries?

Self {
memory_mb,
fast_field_cache_capacity,
split_footer_cache_capacity,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

that's not useful.

/// 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);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

that's not useful.

@fulmicoton-dd fulmicoton-dd force-pushed the lambda branch 12 times, most recently from fac4b59 to 2a2cc95 Compare January 28, 2026 21:33
mv quickwit-aws-lambda-${{ env.ASSET_VERSION }}-aarch64.zip ../../../../

- name: Upload to GitHub release
uses: quickwit-inc/upload-to-github-release@v1

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Release Lambda binary' step
Uses Step
uses 'quickwit-inc/upload-to-github-release' with ref 'v1', not a pinned commit hash
  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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant