Skip to content
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

chore: add best practices section in docs #2184

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions docs/operations/best-practices/udf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# User Defined Functions

Few guidelines and tips to help with common use cases and FAQs for UDFs

## High latency operations in UDF

If running a user code which has very high latency or high processing time

1. Increase the `lookbackSeconds` for the autoscaling - This dictates how many seconds to look back for vertex average
processing rate (tps) and pending messages calculation, defaults to `120`. In case of tasks taking longer than
this duration, you need to increase`lookbackSeconds` so that the calculated average rate and pending messages won't
be 0 during the silent period. Refer [Autoscaling](../../user-guide/reference/autoscaling.md) for more information
```yaml
apiVersion: numaflow.numaproj.io/v1alpha1
kind: Pipeline
metadata:
name: my-pipeline
spec:
vertices:
- name: my-vertex
scale:
lookbackSeconds: 120 # Optional, defaults to 120.
....
```

2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ nav:
- operations/metrics/metrics.md
- operations/grafana.md
- Security: operations/security.md
- Best Practices:
- UDF: "operations/best-practices/udf.md"
- Contributor Guide:
- development/development.md
- Specifications:
Expand Down
Loading