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

6kWU3Bq5/1292-a-per-user-limit-throttling #66

Merged
merged 2 commits into from
Jan 4, 2024
Merged
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
36 changes: 36 additions & 0 deletions docs/features/deduplication.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 👥 Deduplication

Deduplication is the process of detecting duplicates in a system and removing them.

In NotificationAPI, this refers to the process of detecting duplicate notifications (same user, same channel, same content) and preventing them from being sent.

## What constitutes a duplicate?

A notification is duplicate if it is:

- The same notification type, e.g. `order_tracking`
- Being sent to the same user ID
- Using the same channels as before, e.g. email & in-app
- With the same exact content (same subject, same message, same attachments, ...)

## How does it work?

import img from '@site/static/NotificationAPI notification as a service deduplication feature.png';

<img src={img} style={{maxWidth: 480, borderRadius: 20, border: '1px solid #d9d9d9' }} />

When setting up deduplication, you are asked to select a deduplication duration. This is the window of time during which we will consider a notification a duplicate of another.

Example: duplication window of 1 hour

- A notification is sent to user at 10:00:00AM (successful)
- Same notification to user at 10:59:59AM (ignored)
- Same notification to user at 11:02:00AM (successful)

Ignored requests are properly logged in our logs and insights features

## How to use the deduplication feature?

Deduplication is a feature that can be enabled on a per-notification basis in the notification configuration page.

It is disabled by default.
2 changes: 1 addition & 1 deletion docs/features/mergetags.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 🎁 Dynamic Parameters (Merge Tags)
# 📦 Parameters (Merge Tags)

**Merge tags** are values that cannot be hard-coded into notification designs and must be passed in programmatically from your code. For examples:

Expand Down
24 changes: 24 additions & 0 deletions docs/features/throttling.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# ✋ Notification Throttling

Throttiling allows you to prevent software bugs or UX flaws from flooding your end-users with too many notifications.

## How does it work?

You can pick how many of the same notification you want to allow to be sent to a user within a given time window.

import img from '@site/static/NotificationAPI - Notifications as a service - throttling detection 6.png';

<img src={img} style={{maxWidth: 480, borderRadius: 20, border: '1px solid #d9d9d9' }} />

For example, if you configure throttling to allow 5 `delivery_tracking` notifications within one hour, it means that:

- You can still send 10 `delivery_tracking` notifications to 10 different users within one hour
- The same user can only receive 5 within one hour
- The 6th `delivery_tracking` notification to the same user within one hour will be ignored
- Ignored requests are properly logged in our logs and insights features

## How to use the throttling feature?

Throttling can be configured on a per-notification basis in the notification configuration page.

It is disabled by default.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading