We have been trying to upgrade our application from using JBOSS 5.1 to Wildfly 10.1. We have rolled out the changes and got stuck in production due to missing performance settings. This blog is to give those performance settings in Wildfly 10.1 that we used.

The most important miss we did is we did not enable compression in Wildfly 10.1. Following are the changes we did on the standalone.xml,

  1. Enable compression using following properties
  2. + <!-- START CHANGES -->
    + <system-properties>
    +    <property name="org.apache.catalina.connector.X_POWERED_BY" value="false"/>
    +    <property name="org.apache.coyote.http11.Http11Protocol.SERVER" value="unknown"/>
    +    <property name="org.apache.coyote.http11.Http11Protocol.COMPRESSION" value="on"/>
    +    <property name="org.apache.coyote.http11.Http11Protocol.COMPRESSION_MIME_TYPES" value="text/css,text/javascript,image/gif,image/jpeg,image/png,text/html,image/bmp,text/plain,application/msword,image/x-icon,application/javascript,application/pdf,application/powerpoint,application/mspowerpoint,application/rtf,text/richtext,application/plain,application/excel,application/x-excel,application/xml,text/xml,application/octet-stream"/>
    + </system-properties>
    + <!-- END CHANGES -->
    +
    
  3. Thread configuration
  4. IO Threads are spanning more than 250 as we compare with JBOSS 5.1. This has been restricted with following settings. For more details refer this WIldfly 10.1 IO Subsystem

    + <!-- START CHANGES -->
    + <worker name="default" task-max-threads="250"/>
    + <!-- END CHANGES -->
    
  5. Thread configuration
  6. We have updated our https-listener for MaxPostSize and Buffer Size same like JBOSS 5.1. The change was something like below,

    + <!-- START CHANGES -->
    + <https-listener name="https" socket-binding="https" security-realm="ApplicationRealm" secure="true" enable-http2="${ENABLE_HTTP2:true}"  record-request-start-time="${RECORD_TD_TIME:true}" max-parameters="${MAX_HTTP_PARAMETER:1000}" max-post-size="10485670" max-buffered-request-size="10485670"/>
    + <!-- END CHANGES -->
    
  7. Filter to be set and allow mime types coming via Content-Type attribute
  8. + <!-- START CHANGES -->
    + <filter-ref name="gzipFilter" predicate="exists['%{o,Content-Type}'] and regex[pattern='(?:text/css|text/javascript|image/gif|image/jpeg| image/png|text/html|image/bmp|text/plain|application/msword|image/x-icon|application/javascript|application/pdf|application/powerpoint| application/mspowerpoint|application/rtf|text/richtext|application/plain|application/excel|pplication/x-excel|application/xml|text/xml|application/octet-stream)(;.*)?', value=%{o,Content-Type}, full-match=true]"/>
    + <!-- END CHANGES -->
    
  9. At last, Wildfly needs to be enabled with gzipFilter
  10. + <!-- MANUAL CHANGES -->
    + <gzip name="gzipFilter"/>
    + <!-- END CHANGES -->
    

Hope it helps someone !

Leave a Reply

Your email address will not be published.

WP2Social Auto Publish Powered By : XYZScripts.com