> On May 17, 2016, 5:09 p.m., Maxim Khutornenko wrote: > > src/main/java/org/apache/aurora/scheduler/events/Webhook.java, line 45 > > <https://reviews.apache.org/r/47440/diff/3/?file=1385244#file1385244line45> > > > > +1 > > > > Also, consider caching and reusing the connection in a `LoadingCache` > > [1] with `expireAfterAccess` set to close it due to inactivity. You can > > implementing disconnect() inside a `RemovalListener`. > > > > [1] - https://github.com/google/guava/wiki/CachesExplained > > Dmitriy Shirchenko wrote: > Can you help me and clarify what we are trying to optimize here? I looked > at > https://docs.oracle.com/javase/8/docs/technotes/guides/net/http-keepalive.html > and if I'm reading that correctly, at a layer below HTTPURLConnection, the > actual connections are persisted. > > I added a Keep-Alive and removed disconnect.
Ignore the above, reading into the `HttpUrlConnection` does indeed indicate connections are cached and reused by default. - Maxim ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/47440/#review133555 ----------------------------------------------------------- On May 22, 2016, 1:29 p.m., Dmitriy Shirchenko wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/47440/ > ----------------------------------------------------------- > > (Updated May 22, 2016, 1:29 p.m.) > > > Review request for Aurora, Maxim Khutornenko and Stephan Erb. > > > Bugs: AURORA-1683 > https://issues.apache.org/jira/browse/AURORA-1683 > > > Repository: aurora > > > Description > ------- > > Looking for some feedback whether I'm on the correct path in adding a > webhook. All comments are welcome! > > > Diffs > ----- > > docs/reference/scheduler-configuration.md > f7d676d0ed6bc536f4341dbb9365cf50e8607efb > examples/vagrant/upstart/aurora-scheduler.conf > 3d9e706de564df5e24cb34265bebc0db1cad11a0 > src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java > 9ebfe230836e88a97bc60092373f72f176a8f6f2 > src/main/java/org/apache/aurora/scheduler/events/PubsubEvent.java > 2a4c0665e48d30e0655de00bd7f6f9b49f01eafc > src/main/java/org/apache/aurora/scheduler/events/Webhook.java PRE-CREATION > src/main/java/org/apache/aurora/scheduler/events/WebhookInfo.java > PRE-CREATION > src/main/java/org/apache/aurora/scheduler/events/WebhookModule.java > PRE-CREATION > src/main/resources/org/apache/aurora/scheduler/webhook.json PRE-CREATION > src/test/java/org/apache/aurora/scheduler/events/WebhookTest.java > PRE-CREATION > > Diff: https://reviews.apache.org/r/47440/diff/ > > > Testing > ------- > > Need to fix tests. > > > Thanks, > > Dmitriy Shirchenko > >
