Best practices for high performance apps

Prev Next
This content is currently unavailable in Chinese. You are viewing the default (English) version.

This guide outlines best practices for designing high-performance Tulip applications that scale efficiently in production environments. Following these recommendations will help ensure your apps remain responsive and stable, even as your operation scales.

NOTE

The recommendations in this article apply wherever your solutions include the use of connector functions to the Tulip API. These include:

  • Connector Function runs or API Calls on App Level Triggers (timer, button, step enter, e.g.)
  • API calls from Node RED
  • Scripts with API calls originating outside of Tulip solutions
  • Writes to Tulip Tables using the Table API from other systems

Guidance

High-Frequency Table Writing Using Table APIs

Using Table APIs to write multiple times per second can impact your instance’s performance and cause delay in storing data. The recommendations below apply to all scripts that run on a Tulip instance:

Recommendation

  • Limit Table writes to 10 calls per second per table
  • Avoid frequent writes to the same Record in a Table (more than 1/sec)

When thresholds are exceeded, Tulip may rate limit and return error code 429. Scripts should be made resilient to 429 error codes to try again after a delay.

Excessive Timer Triggers

Low-interval timer triggers (every 1-2 seconds) can overwhelm your apps. This is especially true when timer triggers include multiple API calls (i.e. table writes or connector function runs).

Tulip no longer supports a timer trigger with <30sec frequency. For timer triggers used in an event-based architecture (i.e. a table record field changed or the current time is 7:00am), we recommend using Machines or Automations. Contact your Tulip representative if you have questions about this transition.

Recommendation:

  • Limit timer intervals to 30 seconds per execution
  • Consider refactoring applications to use automations for some actions previously attached to timer triggers