faast.js

faast.js

  • Docs
  • API
  • Community
  • GitHub
  • Blog

faastjs > CommonOptions

CommonOptions interface

Options common across all faast.js providers. Used as argument to faast().

Signature:

export interface CommonOptions 

Remarks

There are also more specific options for each provider. See AwsOptions, GoogleOptions, and LocalOptions.

Properties

PropertyModifiersTypeDescription
childProcess?boolean(Optional) If true, create a child process to isolate user code from faast scaffolding. Default: true.
childProcessMemoryMb?number(Optional) When childProcess is true, the child process will be spawned with the value of this property as the setting for --max-old-space-size.
concurrency?number(Optional) The maximum number of concurrent invocations to allow. Default: 100, except for the local provider, where the default is 10.
description?string(Optional) A user-supplied description for this function, which may make it easier to track different functions when multiple functions are created.
env?{ [key: string]: string; }(Optional) Environment variables available during serverless function execution. Default: {}.
exclude?string[](Optional) Exclude a subset of files included by CommonOptions.include.
gc?"auto" | "force" | "off"(Optional) Garbage collector mode. Default: "auto".
include?(string | IncludeOption)[](Optional) Include files to make available in the remote function. See IncludeOption.
maxRetries?number(Optional) Maximum number of times that faast will retry each invocation. Default: 2 (invocations can therefore be attemped 3 times in total).
memorySize?number(Optional) Memory limit for each function in MB. This setting has an effect on pricing. Default varies by provider.
mode?"https" | "queue" | "auto"(Optional) Specify invocation mode. Default: "auto".
packageJson?string | object(Optional) Specify a package.json file to include with the code package.
rate?number(Optional) Rate limit invocations (invocations/sec). Default: no rate limit.
retentionInDays?number(Optional) Specify how many days to wait before reclaiming cloud garbage. Default: 1.
speculativeRetryThreshold?number(BETA) (Optional) Reduce tail latency by retrying invocations that take substantially longer than other invocations of the same function. Default: 3.
timeout?number(Optional) Execution time limit for each invocation, in seconds. Default: 60.
useDependencyCaching?boolean(Optional) Cache installed dependencies from CommonOptions.packageJson. Only applies to AWS. Default: true.
validateSerialization?boolean(Optional) Check arguments and return values from cloud functions are serializable without losing information. Default: true.
webpackOptions?webpack.Configuration(Optional) Extra webpack options to use to bundle the code package.
  • CommonOptions interface
  • Remarks
  • Properties
faast.js
Docs
IntroductionAPI ReferenceContributingExamples
Community
DiscordTwitterStack Overflowfaast.js
More
BlogUser Showcase
Copyright © 2023 Andy Chou