1, classification management: core applications and services using the best hardware; Service deployment isolation, low-priority services are isolated on different virtual machines by starting different threads or deployments.
While high-priority services are deployed on different physical machines, core services and data are even deployed in data centers in different cities.
2. Time-Out setting: Sets the timeout for service invocation and, once timed out, the communication framework throws an exception.
3, asynchronous call: through the message queue and other asynchronous way, to avoid a service failure resulting in the entire application failure situation.
4. Service downgrade: Denial of service and shutdown feature. Deny low priority services and turn off unimportant features.
5, idempotent design: Service Repeat call is unavoidable, how to ensure that the operation results of repeated calls is very critical, so you must ensure that repeated calls and calls once produced the same result, that is, the service is idempotent.
Service idempotent is sometimes natural, such as setting the user's gender as a male, regardless of how many times it is set, the result is the same, but for operations such as transfer transactions, the problem becomes complex and requires information such as transaction numbers.
For service invocation validation, only valid actions can continue.