This is configuration example according to a kind of WAS.

(you can adjust the detail value according to WAS version or type)

 

1.  Rest Http setup (a.k.a Netflix Feign)

feign:

  httpclient:

       maxConnections: 200

       maxConnectionsPerRoute: 50

 

2. spring-boot WAS  setup (internal tomcat use case)

1) internal tomcat setup

server:

  tomcat:

    threads:

      max: 200

      min-spare: 10

    accept-count: 100

  port: 8080

 

2) hikari DB connection

spring:

     datasource:

            url: 

            username:

            password:

            driverClassName:

            hikari:

                 max-active: 10

                 max-idle: 8

                 min-idle: 8

                 initial-size: 5

                 maximum-pool-size: 5

                 allow-pool-suspension: true

                 auto-commit: true

                 connection-init-sql: select 1

                 connection-test-query: select 1

                 connection-timeout: 500

                 idle-timeout: 10000

                 initialization-fail-timeout: 1000

                 keepalive-time: 10000

                 leak-detection-threshold: 10000

                 max-lifetime: 600000

 

3.  spring-boot WAS setup  (external tomcat use case)

1) tomcat configuration

http listener

      maxThreads="1000" minSpareThreads="100"

      connectionTimeout="20000"

      maxPostSize="-1"

      URIEncoding="UTF-8"

      useBodyEncodingForURI="true"

      enableLookups="false"

 

2) db connection configuration

 <Resource

        name="jdbc/test"

        auth="Container"

        type="javax.sql.DataSource"

        factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"

        driverClassName="oracle.jdbc.OracleDriver"

        url="jdbc:oracle:thin:@192.168.10.20:1521:ORA1"

        username="test"

        password="test00"

        maxActive="20"

        maxIdle="10"

        initialSize="10"

        connectionPoolName="test_pool"

        maxWait="-1"/>

+ Recent posts