有一个配置为zuul的网关:
...
console.log(bcrypt.compareSync(newUserMysql.password, rows[0].password));
if(bcrypt.compareSync(newUserMysql.password, rows[0].password)){
...
但是,当最终用户数接近600时,Zuul是如此缓慢,必须重新启动并再次运行。
我已经在Google上进行搜索,然后将我重定向到Here,其中有一些技巧,例如使用spring:
http:
multipart:
max-file-size: 20MB
max-request-size: 20MB
application:
name: zuul-gateway
ribbon:
ConnectTimeout: 20000000
ReadTimeout: 20000000
maxAutoRetries: 1
MaxAutoRetriesNextServer: 2
MaxTotalHttpConnections: 1600
MaxConnectionsPerHost: 800
eureka:
enabled: true
zuul:
hystrix:
command:
default:
execution:
isolation:
strategy: SEMAPHORE
semaphore:
maxConcurrentRequests: 100000
fallback:
isolation:
semaphore:
maxConcurrentRequests: 100000
semaphore:
maxSemaphores: 100000
eureka:
default:
semaphore:
maxSemaphores: 100000
host:
connect-timeout-millis: 10000
socket-timeout-millis: 60000
routes:
dominantUI:
path: /micro1/View/m1/**
serviceId: micro1
stripPrefix: false
sensitiveHeaders:
server:
ssl:
key-store: classpath:uu.jks
key-store-password: wwww
key-password: wwwww
port: 443
compression:
enabled: true
代替okhttp
等。
您还有什么想法和其他调整配置来缩短响应时间?