notum-cz / strapi-plugin-record-locking

This plugin provides the functionality to prevent data loss in cases where multiple users are simultaneously editing the same record within STRAPI v4.
20 stars 7 forks source link

Feature/add transport config #55

Closed Krofer closed 9 months ago

Krofer commented 9 months ago

This feature will fix error in https://github.com/notum-cz/strapi-plugin-record-locking/issues/4

If we use Kubernetes architecture in our project we can use replicas. Kubernetes replicas are clones that facilitate self-healing for pods. As with most processes and services, pods are liable to failure, errors, evictions, and deletion. For instance, pods may fail and be subsequently evicted when there is a sudden drop in system resources and an increase in node pressure.

If we use WebSocket without transport parameters, then WebSocket use default - ["polling", "websocket"]

Polling is mode when browser send a lot of request to our server and get some information about session id. But, if we have more then 1 replicas all requests send to different pods and returns with different information about session id. Because of this - we have error with code 400

For fix this problem I added new config - transport