storacha-network / w3infra

🏗️ Infra for the w3up UCAN protocol implementation
Other
13 stars 5 forks source link

fix(filecoin): increase metrics consumer parallelization factor #403

Closed alanshaw closed 3 weeks ago

alanshaw commented 3 weeks ago

The filecoin metrics consumer has been observed to take up to 10 seconds to execute and appears to be the reason that iterator age is continuously increasing.

This PR increases the parallelization factor so that multiple executions can consume the stream in parallel. It also increases the timeout for the lambda in line with other timeouts in the same stack. This is because errors occur when it takes 10 seconds, and it does not ever take longer - hinting that it sometimes needs longer.

Note: I believe it is fine to do this in parallel because the lambda simply issues increment (ADD) instructions to dynamo for the metrics, not SET.

Screenshot 2024-07-05 at 11 51 40 Screenshot 2024-07-05 at 11 55 30
seed-deploy[bot] commented 3 weeks ago
View stack outputs - **pr403-w3infra-BillingDbStack** Name | Value -- | -- customerTableName | pr403-w3infra-customer spaceDiffTableName | pr403-w3infra-space-diff spaceSnapshotTableName | pr403-w3infra-space-snapshot usageTable | pr403-w3infra-usage - **pr403-w3infra-BillingStack** Name | Value -- | -- ApiEndpoint | https://mu3s5wllg3.execute-api.us-east-2.amazonaws.com billingCronHandlerURL | https://ylqjuzvptbyrwb4pbgxcgqlxnu0fvywd.lambda-url.us-east-2.on.aws/ CustomDomain | https://pr403.billing.web3.storage - **pr403-w3infra-CarparkStack** Name | Value -- | -- BucketName | carpark-pr403-0 Region | us-east-2 - **pr403-w3infra-RoundaboutStack** Name | Value -- | -- ApiEndpoint | https://8a3ml5n2if.execute-api.us-east-2.amazonaws.com CustomDomain | https://pr403.roundabout.web3.storage - **pr403-w3infra-UcanInvocationStack** Name | Value -- | -- invocationBucketName | invocation-store-pr403-0 taskBucketName | task-store-pr403-0 workflowBucketName | workflow-store-pr403-0 - **pr403-w3infra-UploadApiStack** Name | Value -- | -- ApiEndpoint | https://gou5ov2ha4.execute-api.us-east-2.amazonaws.com CustomDomain | https://pr403.up.web3.storage - **pr403-w3infra-BusStack** - **pr403-w3infra-FilecoinStack** - **pr403-w3infra-IndexerStack** - **pr403-w3infra-ReplicatorStack** - **pr403-w3infra-UcanFirehoseStack** - **pr403-w3infra-UploadDbStack**