Performance for multitenant application (continued)
This is a continuation of the articles on multitenancy with the most recent one linked https://1drv.ms/w/s!Ashlm-Nw-wnWhLZnYUBoDUNcjAHNwQ?e=NAo7vM. This article continues to focus on performance
Large volumes of web service calls
can cause stability and performance issues. It is important to understand the
operational limits and to scale such that the load always falls under the
limit. External applications can handle the HTTP Status codes 429 for too many
requests and 504 for gateway timeout.
Handling status code 429 requires the
client to adopt a retry logic while providing a cool off period. Retries can be
regular interval, incremental interval, exponential backoff, and randomization.
Status code 504 requires the client to refactor the long running request to
execute within the time limit by splitting the request into multiple requests.
Then the potential 429 codes can be handled by a backoff strategy. A common
pattern is to implement a queue in the external application to flatten the
spikes in the traffic. If the request gets a 429, it is put back in the queue
and one of the retry strategies is applied.
Reports can be
efficiently written. They can pertain to a single instance of an entity like an
invoice or they can be more analytical in nature by performing joins across
multiple instances. Faster reports can
be enabled by performing read scale-out to read data from a read-only copy of
the database, by using partial records to reduce the data loaded from the
database, by using AL queries to optimize the way data is read from the
database, and using word layouts and RDL layouts which can result in slower
performance with document reports, especially for actions related to the user
interface.
If a data lake or a data warehouse is
involved, there are typically two types of data extractions: 1. a historical
load with all the data from a given point-of-time and 2. delta loads on what
changed since the historical load. The fastest and least disruptive way to
get ahistorical load is usually a SQL BACPAC
file that can be restored on a private database server. The fastest or the least disruptive way to
get delta loads is to setup API queries configured with read scale-out and use
of data audit field LastModifiedOn.
No comments:
Post a Comment