gaodm 5 lat temu
rodzic
commit
c6ebf6a754

+ 24 - 3
config-server/src/main/resources/shared/application-dev.yml

@@ -3,10 +3,20 @@
 #    org.springframework.security: INFO
 
 hystrix:
+  threadpool:
+    default:
+      coreSize: 200 #并发执行的最大线程数,默认10
+      maxQueueSize: 200 #BlockingQueue的最大队列数
+      queueSizeRejectionThreshold: 50 #即使maxQueueSize没有达到,达到queueSizeRejectionThreshold该值后,请求也会被拒绝
   command:
     default:
       execution:
+        timeout:
+          enabled: true
         isolation:
+          strategy: SEMAPHORE
+          semaphore:
+            maxConcurrentRequests: 2000
           thread:
             timeoutInMilliseconds: 20000
 
@@ -16,6 +26,20 @@ ribbon:
   MaxAutoRetries: 0
   MaxAutoRetriesNextServer: 1
 
+feign:
+  hystrix:
+    enabled: true
+  #开启Feign请求压缩
+  compression:
+    response:
+      enabled: true
+  httpclient:
+    enabled: false
+  okhttp:
+    enabled: true
+    max-connections: 1000 # 默认值
+    max-connections-per-route: 250 # 默认值
+
 eureka:
   instance:
     prefer-ip-address: true #使用IP注册
@@ -50,9 +74,6 @@ management:
   endpoint:
     health:
       show-details: always
-feign:
-  hystrix:
-    enabled: true
 
 spring:
   #消息总线

+ 24 - 3
config-server/src/main/resources/shared/application-local.yml

@@ -3,10 +3,20 @@
 #    org.springframework.security: INFO
 
 hystrix:
+  threadpool:
+    default:
+      coreSize: 200 #并发执行的最大线程数,默认10
+      maxQueueSize: 200 #BlockingQueue的最大队列数
+      queueSizeRejectionThreshold: 50 #即使maxQueueSize没有达到,达到queueSizeRejectionThreshold该值后,请求也会被拒绝
   command:
     default:
       execution:
+        timeout:
+          enabled: true
         isolation:
+          strategy: SEMAPHORE
+          semaphore:
+            maxConcurrentRequests: 2000
           thread:
             timeoutInMilliseconds: 20000
 
@@ -16,6 +26,20 @@ ribbon:
   MaxAutoRetries: 0
   MaxAutoRetriesNextServer: 1
 
+feign:
+  hystrix:
+    enabled: true
+  #开启Feign请求压缩
+  compression:
+    response:
+      enabled: true
+  httpclient:
+    enabled: false
+  okhttp:
+    enabled: true
+    max-connections: 1000 # 默认值
+    max-connections-per-route: 250 # 默认值
+
 eureka:
   instance:
     prefer-ip-address: true #使用IP注册
@@ -50,9 +74,6 @@ management:
   endpoint:
     health:
       show-details: always
-feign:
-  hystrix:
-    enabled: true
 
 spring:
   #消息总线

+ 24 - 3
config-server/src/main/resources/shared/application-pre.yml

@@ -3,10 +3,20 @@
 #    org.springframework.security: INFO
 
 hystrix:
+  threadpool:
+    default:
+      coreSize: 200 #并发执行的最大线程数,默认10
+      maxQueueSize: 200 #BlockingQueue的最大队列数
+      queueSizeRejectionThreshold: 50 #即使maxQueueSize没有达到,达到queueSizeRejectionThreshold该值后,请求也会被拒绝
   command:
     default:
       execution:
+        timeout:
+          enabled: true
         isolation:
+          strategy: SEMAPHORE
+          semaphore:
+            maxConcurrentRequests: 2000
           thread:
             timeoutInMilliseconds: 20000
 
@@ -16,6 +26,20 @@ ribbon:
   MaxAutoRetries: 0
   MaxAutoRetriesNextServer: 1
 
+feign:
+  hystrix:
+    enabled: true
+  #开启Feign请求压缩
+  compression:
+    response:
+      enabled: true
+  httpclient:
+    enabled: false
+  okhttp:
+    enabled: true
+    max-connections: 1000 # 默认值
+    max-connections-per-route: 250 # 默认值
+
 eureka:
   instance:
     prefer-ip-address: true #使用IP注册
@@ -50,9 +74,6 @@ management:
   endpoint:
     health:
       show-details: always
-feign:
-  hystrix:
-    enabled: true
 
 spring:
   #消息总线

+ 24 - 3
config-server/src/main/resources/shared/application-pro.yml

@@ -3,10 +3,20 @@
 #    org.springframework.security: INFO
 
 hystrix:
+  threadpool:
+    default:
+      coreSize: 200 #并发执行的最大线程数,默认10
+      maxQueueSize: 200 #BlockingQueue的最大队列数
+      queueSizeRejectionThreshold: 50 #即使maxQueueSize没有达到,达到queueSizeRejectionThreshold该值后,请求也会被拒绝
   command:
     default:
       execution:
+        timeout:
+          enabled: true
         isolation:
+          strategy: SEMAPHORE
+          semaphore:
+            maxConcurrentRequests: 2000
           thread:
             timeoutInMilliseconds: 20000
 
@@ -16,6 +26,20 @@ ribbon:
   MaxAutoRetries: 0
   MaxAutoRetriesNextServer: 1
 
+feign:
+  hystrix:
+    enabled: true
+  #开启Feign请求压缩
+  compression:
+    response:
+      enabled: true
+  httpclient:
+    enabled: false
+  okhttp:
+    enabled: true
+    max-connections: 1000 # 默认值
+    max-connections-per-route: 250 # 默认值
+
 eureka:
   instance:
     prefer-ip-address: true #使用IP注册
@@ -50,9 +74,6 @@ management:
   endpoint:
     health:
       show-details: always
-feign:
-  hystrix:
-    enabled: true
 
 spring:
   #消息总线

+ 24 - 3
config-server/src/main/resources/shared/application-test.yml

@@ -3,10 +3,20 @@
 #    org.springframework.security: INFO
 
 hystrix:
+  threadpool:
+    default:
+      coreSize: 200 #并发执行的最大线程数,默认10
+      maxQueueSize: 200 #BlockingQueue的最大队列数
+      queueSizeRejectionThreshold: 50 #即使maxQueueSize没有达到,达到queueSizeRejectionThreshold该值后,请求也会被拒绝
   command:
     default:
       execution:
+        timeout:
+          enabled: true
         isolation:
+          strategy: SEMAPHORE
+          semaphore:
+            maxConcurrentRequests: 2000
           thread:
             timeoutInMilliseconds: 20000
 
@@ -16,6 +26,20 @@ ribbon:
   MaxAutoRetries: 0
   MaxAutoRetriesNextServer: 1
 
+feign:
+  hystrix:
+    enabled: true
+  #开启Feign请求压缩
+  compression:
+    response:
+      enabled: true
+  httpclient:
+    enabled: false
+  okhttp:
+    enabled: true
+    max-connections: 1000 # 默认值
+    max-connections-per-route: 250 # 默认值
+
 eureka:
   instance:
     prefer-ip-address: true #使用IP注册
@@ -50,9 +74,6 @@ management:
   endpoint:
     health:
       show-details: always
-feign:
-  hystrix:
-    enabled: true
 
 spring:
   #消息总线