You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/02/08 13:11:40 UTC

[GitHub] massakam opened a new pull request #3550: Create SSL context in constructor of ChannelInitializer

massakam opened a new pull request #3550: Create SSL context in constructor of ChannelInitializer
URL: https://github.com/apache/pulsar/pull/3550
 
 
   ### Motivation
   
   To use TLS, it is necessary to read a private key and certificate files to create an SSL context. Currently, Pulsar reads these files every time a new TLS session is established.
   https://github.com/apache/pulsar/blob/a62633b218f58d1b9cdba8524258920edd403208/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/PulsarChannelInitializer.java#L51-L67
   
   Therefore, when many TLS sessions are started at the same time, the load on the broker increases exponentially. This becomes pronounced if the size of the trusted certificate file is large.
   
   ### Modifications
   
   Currently, a SSL context is created in `initChannel` methods of subclasses of `ChannelInitializer`.
   Moving that process to the constructors eliminate the need to read private key and certificates every time.
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   This change is already covered by existing tests, such as TlsProducerConsumerTest.
   
   ### Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API: (no)
     - The schema: (no)
     - The default values of configurations: (no)
     - The wire protocol: (no)
     - The rest endpoints: (no)
     - The admin cli options: (no)
     - Anything that affects deployment: (no)
   
   ### Documentation
   
     - Does this pull request introduce a new feature? (no)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services