You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copyright 2021 easegress-io
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
CircuitBreaker
CircuitBreaker is used for blocking all in-coming requests when the the failure numbers
reach the configured limitation. You can declare an CircuitBreaker with COUNT_BASED or
TIME_BASED type. It has three types of states, open, closed and half-close. One service
can declare its desired CircuitBreaker, and the upstream clients will active the same CircuitBreaker
FailureRateThreshold configures the failure rate threshold in percentage. When the failure rate is equal or greater than the threshold the CircuitBreaker transitions to open and starts short-circuiting calls.
SlowCallRateThreshold Configures a threshold in percentage. The CircuitBreaker considers a call as slow when the call duration is greater than slowCallDurationThreshold When the percentage of slow calls is equal or greater the threshold, the CircuitBreaker transitions to open and starts short-circuiting calls.
MinimumNumberOfCalls configures the minimum number of calls which are required (per sliding window period) before the CircuitBreaker can calculate the error rate or slow call rate. For example, if minimumNumberOfCalls is 10, then at least 10 calls must be recorded, before the failure rate can be calculated. If only 9 calls have been recorded the CircuitBreaker will not transition to open even if all 9 calls have failed.
MaxWaitDurationInHalfOpenState configures a maximum wait duration which controls the longest amount of time a CircuitBreaker could stay in Half Open state, before it switches to open. Value 0 means Circuit Breaker would wait infinitely in HalfOpen State until all permitted calls have been completed.
Mock is the spec of mocking service's HTTP responses. Once enabled,
this service won't need to be deployed, and other services visit it will get
the configured response directly.
MessageTimeout configures the timeout for the message queue.
RateLimiter
RateLimiter configures a limiter which can establish your services' high availability and reliability,
also it can be used for scaling APIs. RateLimiter can protect servers from overwhelm by the peak traffic.
Urls describe the HTTP request matching schemes for this limiter to filter.
RateLimiterPolicy
RateLimiterPolicy configures the limiting policy used for Resilience component RateLimiter.
It contains the basic configurations for the limiter, including the permission number,
the duration for request waiting and the permission count refreshing period.
FailureCodes is the codes indicating the circuit breaker and retry to count the response as a failure.
Retry
Retry can perform an API calling retry when the service HTTP response code indicated its in
temporary unavailable states. The up-stream client should make sure this API is idempotent.
The service can declare an Retry for its desired APIs and active in client side.
RandomizationFactor configures the factor used for backoff, value between 0 and 1.
Service
Service is the basic element in EaseMesh to describe a user's business microservices'
name, belonging tenant, and governance specs. One service should belongs to a dedicated
tenant.
Priority must be [1, 9], the default is 5 if user does not set it. The smaller number get higher priority. The order is sorted by name alphabetically in the same priority.
EgressProtocol is the protocol for egress traffic. Its value is "http"
StringMatch
StringMatch configures how to match string in different ways.
Its priority is according to the field order. StringMatch will try exactly matching firstly,
then try to check has the same prefix, at last, it will use the regular expression to match the
string if it's provided
Regex configures the regular expression for URL to match.
Tenant
Tenant is the logic group of mesh services. Inside the same tenant,
services can visit each other directly. There are two kinds of tenant, one is the common type
of tenants and the other is system reserved "global" tenant which's access scope is globally
inside the mesh . If one mesh service is created with "global" tenant filed, it can be visible
to all the service inside the mesh.
Timeout configures the amount of time the client should wait for replies from a given service,
it will be running in upstream clients and declared in downstream relied services.
Headers configure HTTP requests matching configurations with "OR" relation. Once HTTP requests match one element in this array, it will be regarded as the colored traffic.