graphql-engine/docs/graphql/manual/event-triggers/index.rst
Brandon Simmons c425b554b8
server(events): utilize proper backpressure scheme (close #3839) (#4013)
* Test working through a backlog of change events

* Use a slightly more performant threaded http server in eventing pytests

This helped locally but not on CI it seems...

* Rework event processing for backpressure. Closes #3839

With loo low `HASURA_GRAPHQL_EVENTS_FETCH_INTERVAL` and/or slow webhooks
and/or too small `HASURA_GRAPHQL_EVENTS_HTTP_POOL_SIZE` we might
previously check out events from the DB faster than we can service them,
leading to space leaks, weirdness, etc.

Other changes:
- avoid fetch interval sleep latency when we previously did a non-empty
  fetch
- prefetch event batch while http pool is working
- warn when it appears we can't keep up with events being generated
- make some effort to process events in creation order so we don't
  starve older ones.

ALSO NOTE: HASURA_GRAPHQL_EVENTS_FETCH_INTERVAL changes semantics
slightly, since it only comes into play after an empty fetch. The old
semantics weren't documented in detail, so I think this is fine.
2020-03-11 11:57:31 +05:30

44 lines
1.1 KiB
ReStructuredText

.. meta::
:description: Manage event triggers with Hasura
:keywords: hasura, docs, event trigger
Event Triggers
==============
.. contents:: Table of contents
:backlinks: none
:depth: 1
:local:
Hasura can be used to create event triggers on tables in the Postgres database. Event triggers reliably capture
events on specified tables and invoke webhooks to carry out any custom logic.
.. thumbnail:: ../../../img/graphql/manual/event-triggers/database-event-triggers.png
:class: no-shadow
:alt: Hasura event trigger architecture
Events can be of the following types:
- INSERT: When a row is inserted into a table
- UPDATE: When a row is updated in a table
- DELETE: When a row is deleted from a table
- MANUAL: Using the console or API, an event can be triggered manually on a row
.. note::
Event webhook notifications will be delivered at least once, and may arrive out of order with
respect to the underlying event.
**See:**
.. toctree::
:maxdepth: 2
:titlesonly:
create-trigger
payload
serverless
samples
Invoke trigger via console <invoke-trigger-console>
clean-up