[jira] [Commented] (SCB-687) highway server not accept too many connection

2018-08-01 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16564896#comment-16564896
 ] 

ASF GitHub Bot commented on SCB-687:


liubao68 closed pull request #824: [SCB-687] add highway server connection 
protection
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/824
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/integration-tests/spring-pojo-tests/src/test/java/org/apache/servicecomb/demo/pojo/test/PojoSpringMain.java
 
b/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/ClientClosedEvent.java
similarity index 60%
rename from 
integration-tests/spring-pojo-tests/src/test/java/org/apache/servicecomb/demo/pojo/test/PojoSpringMain.java
rename to 
foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/ClientClosedEvent.java
index a81656cac..68fa037a4 100644
--- 
a/integration-tests/spring-pojo-tests/src/test/java/org/apache/servicecomb/demo/pojo/test/PojoSpringMain.java
+++ 
b/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/ClientClosedEvent.java
@@ -15,17 +15,26 @@
  * limitations under the License.
  */
 
-package org.apache.servicecomb.demo.pojo.test;
+package org.apache.servicecomb.foundation.vertx;
 
-import org.apache.servicecomb.springboot.starter.provider.EnableServiceComb;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
+/**
+ * Notice: this event will raised in vertx eventloop thread, so do not run any 
block code
+ */
+public class ClientClosedEvent {
+  private final String address;
+
+  private final int totalConnectedCount;
 
-@SpringBootApplication
-@EnableServiceComb
-public class PojoSpringMain {
+  public String getAddress() {
+return address;
+  }
+
+  public int getTotalConnectedCount() {
+return totalConnectedCount;
+  }
 
-  public static void main(final String[] args) throws Exception {
-SpringApplication.run(PojoSpringMain.class, args);
+  public ClientClosedEvent(String address, int totalConnectedCount) {
+this.address = address;
+this.totalConnectedCount = totalConnectedCount;
   }
-}
+}
\ No newline at end of file
diff --git 
a/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/ClientConnectedEvent.java
 
b/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/ClientConnectedEvent.java
new file mode 100644
index 0..09e752e8e
--- /dev/null
+++ 
b/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/ClientConnectedEvent.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.foundation.vertx;
+
+import io.vertx.core.net.NetSocket;
+
+/**
+ * Notice: this event will raised in vertx eventloop thread, so do not run any 
block code
+ */
+public class ClientConnectedEvent {
+  private final NetSocket netSocket;
+
+  private final int totalConnectedCount;
+
+  public NetSocket getNetSocket() {
+return netSocket;
+  }
+
+  public int getTotalConnectedCount() {
+return totalConnectedCount;
+  }
+
+  public ClientConnectedEvent(NetSocket netSocket, int totalConnectedCount) {
+this.netSocket = netSocket;
+this.totalConnectedCount = totalConnectedCount;
+  }
+}
\ No newline at end of file
diff --git 
a/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/server/TcpServer.java
 
b/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/server/TcpServer.java
index a4fd6902e..a2db20637 100644
--- 
a/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/server/TcpServer.java
+++ 
b/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/server/TcpServer.java
@@ -18,14 +18,19 @@
 package org.apache.servicecomb

[jira] [Commented] (SCB-687) highway server not accept too many connection

2018-07-31 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16564796#comment-16564796
 ] 

ASF GitHub Bot commented on SCB-687:


wujimin commented on a change in pull request #824: [SCB-687] add highway 
server connection protection
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/824#discussion_r206766484
 
 

 ##
 File path: 
integration-tests/spring-pojo-connection-limit-test/src/test/resources/microservice.yaml
 ##
 @@ -17,7 +17,7 @@
 
 APPLICATION_ID: pojotest-it
 service_description:
-  name: pojo-connection-limit
+  name: pojo
 
 Review comment:
   at last, we will move integration test to real SC, not a mock SC, your logic 
will cause conflict in that time.


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:
us...@infra.apache.org


> highway server not accept too many connection
> -
>
> Key: SCB-687
> URL: https://issues.apache.org/jira/browse/SCB-687
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.1.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-687) highway server not accept too many connection

2018-07-27 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16559537#comment-16559537
 ] 

ASF GitHub Bot commented on SCB-687:


zhengyangyong commented on a change in pull request #824: [SCB-687] add highway 
server connection protection
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/824#discussion_r205731184
 
 

 ##
 File path: 
integration-tests/spring-pojo-connection-limit-test/src/test/java/org/apache/servicecomb/demo/pojo/test/PojoSpringMain.java
 ##
 @@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.demo.pojo.test;
+
+import org.apache.servicecomb.springboot.starter.provider.EnableServiceComb;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+@EnableServiceComb
+public class PojoSpringMain {
+
+  public static void main(final String[] args) {
+SpringApplication.run(PojoSpringMain.class, args);
 
 Review comment:
   Done


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:
us...@infra.apache.org


> highway server not accept too many connection
> -
>
> Key: SCB-687
> URL: https://issues.apache.org/jira/browse/SCB-687
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.1.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-687) highway server not accept too many connection

2018-07-26 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16559207#comment-16559207
 ] 

ASF GitHub Bot commented on SCB-687:


wujimin commented on a change in pull request #824: [SCB-687] add highway 
server connection protection
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/824#discussion_r205660724
 
 

 ##
 File path: 
foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/ClientClosedEvent.java
 ##
 @@ -17,6 +17,9 @@
 
 package org.apache.servicecomb.foundation.vertx;
 
+/**
 
 Review comment:
   sorry, i made a mistake caused by the char "+"


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:
us...@infra.apache.org


> highway server not accept too many connection
> -
>
> Key: SCB-687
> URL: https://issues.apache.org/jira/browse/SCB-687
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.1.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-687) highway server not accept too many connection

2018-07-26 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16559206#comment-16559206
 ] 

ASF GitHub Bot commented on SCB-687:


wujimin commented on a change in pull request #824: [SCB-687] add highway 
server connection protection
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/824#discussion_r205660307
 
 

 ##
 File path: 
integration-tests/spring-pojo-connection-limit-test/src/test/resources/microservice.yaml
 ##
 @@ -0,0 +1,29 @@
+## ---
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##  http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---
+
+APPLICATION_ID: pojotest-it
+service_description:
+  name: pojo
+  version: 0.0.4
+servicecomb:
+  service:
+registry:
+  address: http://127.0.0.1:30100
+  highway:
+address: 0.0.0.0:7070
+server:
+  connection-limit: 0
 
 Review comment:
   already depend on pojo-test jar
   and you want to reuse it's declare
   
   so only need to append new config items, no need to declare everything again.


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:
us...@infra.apache.org


> highway server not accept too many connection
> -
>
> Key: SCB-687
> URL: https://issues.apache.org/jira/browse/SCB-687
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.1.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-687) highway server not accept too many connection

2018-07-26 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16559205#comment-16559205
 ] 

ASF GitHub Bot commented on SCB-687:


wujimin commented on a change in pull request #824: [SCB-687] add highway 
server connection protection
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/824#discussion_r205660228
 
 

 ##
 File path: 
integration-tests/spring-pojo-connection-limit-test/src/test/java/org/apache/servicecomb/demo/pojo/test/PojoSpringMain.java
 ##
 @@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.demo.pojo.test;
+
+import org.apache.servicecomb.springboot.starter.provider.EnableServiceComb;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+@EnableServiceComb
+public class PojoSpringMain {
+
+  public static void main(final String[] args) {
+SpringApplication.run(PojoSpringMain.class, args);
 
 Review comment:
   already depend on pojo-test jar
   just invoke org.apache.servicecomb.demo.pojo.test.PojoTestMain
   no need to depend on complex springboot


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:
us...@infra.apache.org


> highway server not accept too many connection
> -
>
> Key: SCB-687
> URL: https://issues.apache.org/jira/browse/SCB-687
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.1.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-687) highway server not accept too many connection

2018-07-26 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16559203#comment-16559203
 ] 

ASF GitHub Bot commented on SCB-687:


wujimin commented on a change in pull request #824: [SCB-687] add highway 
server connection protection
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/824#discussion_r205660152
 
 

 ##
 File path: 
integration-tests/spring-pojo-connection-limit-test/src/test/resources/log4j.properties
 ##
 @@ -0,0 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+log4j.rootLogger=INFO, stdout
 
 Review comment:
   already depend on pojo-test jar, can remove this file


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:
us...@infra.apache.org


> highway server not accept too many connection
> -
>
> Key: SCB-687
> URL: https://issues.apache.org/jira/browse/SCB-687
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.1.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-687) highway server not accept too many connection

2018-07-26 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16559191#comment-16559191
 ] 

ASF GitHub Bot commented on SCB-687:


zhengyangyong commented on a change in pull request #824: [SCB-687] add highway 
server connection protection
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/824#discussion_r205658270
 
 

 ##
 File path: 
integration-tests/spring-pojo-connection-limit-test/src/test/resources/microservice.yaml
 ##
 @@ -17,7 +17,7 @@
 
 APPLICATION_ID: pojotest-it
 service_description:
-  name: pojo-connection-limit
+  name: pojo
 
 Review comment:
   I think no problem,also reused
   ```java
   PojoService.hello.SayHello("whatever");
   ```
   in pojo-test but need add `servicecomb.highway.server.onnection-limit` 
setting


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:
us...@infra.apache.org


> highway server not accept too many connection
> -
>
> Key: SCB-687
> URL: https://issues.apache.org/jira/browse/SCB-687
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.1.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-687) highway server not accept too many connection

2018-07-26 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16559188#comment-16559188
 ] 

ASF GitHub Bot commented on SCB-687:


zhengyangyong commented on a change in pull request #824: [SCB-687] add highway 
server connection protection
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/824#discussion_r205658022
 
 

 ##
 File path: 
foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/ClientClosedEvent.java
 ##
 @@ -17,6 +17,9 @@
 
 package org.apache.servicecomb.foundation.vertx;
 
+/**
 
 Review comment:
   I copy before, and I am using GoogleStyle in etc


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:
us...@infra.apache.org


> highway server not accept too many connection
> -
>
> Key: SCB-687
> URL: https://issues.apache.org/jira/browse/SCB-687
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.1.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-687) highway server not accept too many connection

2018-07-26 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16559108#comment-16559108
 ] 

ASF GitHub Bot commented on SCB-687:


wujimin commented on a change in pull request #824: [SCB-687] add highway 
server connection protection
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/824#discussion_r205644248
 
 

 ##
 File path: 
integration-tests/spring-pojo-connection-limit-test/src/test/resources/microservice.yaml
 ##
 @@ -17,7 +17,7 @@
 
 APPLICATION_ID: pojotest-it
 service_description:
-  name: pojo-connection-limit
+  name: pojo
 
 Review comment:
   conflict with integration-tests/pojo-test


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:
us...@infra.apache.org


> highway server not accept too many connection
> -
>
> Key: SCB-687
> URL: https://issues.apache.org/jira/browse/SCB-687
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.1.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-687) highway server not accept too many connection

2018-07-26 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16559104#comment-16559104
 ] 

ASF GitHub Bot commented on SCB-687:


wujimin commented on a change in pull request #824: [SCB-687] add highway 
server connection protection
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/824#discussion_r205643987
 
 

 ##
 File path: 
foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/ClientClosedEvent.java
 ##
 @@ -17,6 +17,9 @@
 
 package org.apache.servicecomb.foundation.vertx;
 
+/**
 
 Review comment:
   indentation is one space?
   also need to check other codes.


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:
us...@infra.apache.org


> highway server not accept too many connection
> -
>
> Key: SCB-687
> URL: https://issues.apache.org/jira/browse/SCB-687
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: yangyongzheng
>Priority: Major
> Fix For: java-chassis-1.1.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-687) highway server not accept too many connection

2018-07-23 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16553715#comment-16553715
 ] 

ASF GitHub Bot commented on SCB-687:


zhengyangyong commented on a change in pull request #824: [SCB-687] add highway 
server connection protection
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/824#discussion_r204609279
 
 

 ##
 File path: 
integration-tests/spring-pojo-connection-limit-test/src/test/resources/microservice.yaml
 ##
 @@ -0,0 +1,29 @@
+## ---
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##  http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---
+
+APPLICATION_ID: pojotest-it
+service_description:
+  name: pojo
+  version: 0.0.4
+servicecomb:
+  service:
+registry:
+  address: http://127.0.0.1:30100
+  highway:
+address: 0.0.0.0:7070
+server:
+  connection-limit: 0
 
 Review comment:
   Done


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:
us...@infra.apache.org


> highway server not accept too many connection
> -
>
> Key: SCB-687
> URL: https://issues.apache.org/jira/browse/SCB-687
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: yangyongzheng
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-687) highway server not accept too many connection

2018-07-21 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16551878#comment-16551878
 ] 

ASF GitHub Bot commented on SCB-687:


wujimin commented on a change in pull request #824: [SCB-687] add highway 
server connection protection
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/824#discussion_r204226639
 
 

 ##
 File path: 
integration-tests/spring-pojo-connection-limit-test/src/test/resources/microservice.yaml
 ##
 @@ -0,0 +1,29 @@
+## ---
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##  http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---
+
+APPLICATION_ID: pojotest-it
+service_description:
+  name: pojo
+  version: 0.0.4
+servicecomb:
+  service:
+registry:
+  address: http://127.0.0.1:30100
+  highway:
+address: 0.0.0.0:7070
+server:
+  connection-limit: 0
 
 Review comment:
   discuss with customers, we should support this.


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:
us...@infra.apache.org


> highway server not accept too many connection
> -
>
> Key: SCB-687
> URL: https://issues.apache.org/jira/browse/SCB-687
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: yangyongzheng
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-687) highway server not accept too many connection

2018-07-20 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16550572#comment-16550572
 ] 

ASF GitHub Bot commented on SCB-687:


coveralls edited a comment on issue #824: [SCB-687] add highway server 
connection protection
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/824#issuecomment-406465050
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/18081071/badge)](https://coveralls.io/builds/18081071)
   
   Coverage decreased (-0.03%) to 87.055% when pulling 
**2c17acd2127fb77a3eba4e86d9c6cd12324c8ad0 on zhengyangyong:SCB-687** into 
**8227f0ccbe7d69db51df1fc22b11a364662c1d9d on apache:master**.
   


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:
us...@infra.apache.org


> highway server not accept too many connection
> -
>
> Key: SCB-687
> URL: https://issues.apache.org/jira/browse/SCB-687
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: yangyongzheng
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-687) highway server not accept too many connection

2018-07-20 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16550480#comment-16550480
 ] 

ASF GitHub Bot commented on SCB-687:


zhengyangyong commented on a change in pull request #824: [SCB-687] add highway 
server connection protection
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/824#discussion_r203969867
 
 

 ##
 File path: 
integration-tests/spring-pojo-connection-limit-test/src/test/resources/microservice.yaml
 ##
 @@ -0,0 +1,29 @@
+## ---
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##  http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---
+
+APPLICATION_ID: pojotest-it
+service_description:
+  name: pojo
+  version: 0.0.4
+servicecomb:
+  service:
+registry:
+  address: http://127.0.0.1:30100
+  highway:
+address: 0.0.0.0:7070
+server:
+  connection-limit: 0
 
 Review comment:
   I think it is not necessary yet


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:
us...@infra.apache.org


> highway server not accept too many connection
> -
>
> Key: SCB-687
> URL: https://issues.apache.org/jira/browse/SCB-687
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: yangyongzheng
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-687) highway server not accept too many connection

2018-07-20 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16550479#comment-16550479
 ] 

ASF GitHub Bot commented on SCB-687:


zhengyangyong commented on a change in pull request #824: [SCB-687] add highway 
server connection protection
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/824#discussion_r203969719
 
 

 ##
 File path: 
integration-tests/spring-pojo-connection-limit-test/src/test/resources/log4j.properties
 ##
 @@ -0,0 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+log4j.rootLogger=INFO, stdout
 
 Review comment:
   may do it in https://issues.apache.org/jira/browse/SCB-683 later


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:
us...@infra.apache.org


> highway server not accept too many connection
> -
>
> Key: SCB-687
> URL: https://issues.apache.org/jira/browse/SCB-687
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: yangyongzheng
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-687) highway server not accept too many connection

2018-07-20 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16550380#comment-16550380
 ] 

ASF GitHub Bot commented on SCB-687:


zhengyangyong commented on a change in pull request #824: [SCB-687] add highway 
server connection protection
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/824#discussion_r203969513
 
 

 ##
 File path: 
foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/server/TcpServer.java
 ##
 @@ -18,23 +18,35 @@
 package org.apache.servicecomb.foundation.vertx.server;
 
 import java.net.InetSocketAddress;
+import java.util.concurrent.atomic.AtomicInteger;
 
+import org.apache.servicecomb.foundation.common.event.EventManager;
 import org.apache.servicecomb.foundation.common.net.URIEndpointObject;
 import org.apache.servicecomb.foundation.ssl.SSLCustom;
 import org.apache.servicecomb.foundation.ssl.SSLOption;
 import org.apache.servicecomb.foundation.ssl.SSLOptionFactory;
 import org.apache.servicecomb.foundation.vertx.AsyncResultCallback;
+import org.apache.servicecomb.foundation.vertx.ClientConnectedEvent;
 import org.apache.servicecomb.foundation.vertx.VertxTLSBuilder;
 
+import com.netflix.config.DynamicPropertyFactory;
+
 import io.vertx.core.Vertx;
 import io.vertx.core.net.NetServer;
 import io.vertx.core.net.NetServerOptions;
 
 public class TcpServer {
   private URIEndpointObject endpointObject;
 
+  private final AtomicInteger connectedCounter;
 
 Review comment:
   Done


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:
us...@infra.apache.org


> highway server not accept too many connection
> -
>
> Key: SCB-687
> URL: https://issues.apache.org/jira/browse/SCB-687
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: yangyongzheng
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-687) highway server not accept too many connection

2018-07-20 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16550379#comment-16550379
 ] 

ASF GitHub Bot commented on SCB-687:


zhengyangyong commented on a change in pull request #824: [SCB-687] add highway 
server connection protection
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/824#discussion_r203969498
 
 

 ##
 File path: 
foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/server/TcpServer.java
 ##
 @@ -57,8 +69,18 @@ public void init(Vertx vertx, String sslKey, 
AsyncResultCallback {
-  TcpServerConnection connection = createTcpServerConnection();
-  connection.init(netSocket);
+  if (connectedCounter.get() < connectionLimit) {
 
 Review comment:
   Done


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:
us...@infra.apache.org


> highway server not accept too many connection
> -
>
> Key: SCB-687
> URL: https://issues.apache.org/jira/browse/SCB-687
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: yangyongzheng
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-687) highway server not accept too many connection

2018-07-20 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16550459#comment-16550459
 ] 

ASF GitHub Bot commented on SCB-687:


zhengyangyong commented on a change in pull request #824: [SCB-687] add highway 
server connection protection
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/824#discussion_r203969719
 
 

 ##
 File path: 
integration-tests/spring-pojo-connection-limit-test/src/test/resources/log4j.properties
 ##
 @@ -0,0 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+log4j.rootLogger=INFO, stdout
 
 Review comment:
   may do it in https://issues.apache.org/jira/browse/SCB-683


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:
us...@infra.apache.org


> highway server not accept too many connection
> -
>
> Key: SCB-687
> URL: https://issues.apache.org/jira/browse/SCB-687
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: yangyongzheng
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-687) highway server not accept too many connection

2018-07-20 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16550320#comment-16550320
 ] 

ASF GitHub Bot commented on SCB-687:


zhengyangyong commented on a change in pull request #824: [SCB-687] add highway 
server connection protection
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/824#discussion_r203955424
 
 

 ##
 File path: 
foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/server/TcpServer.java
 ##
 @@ -18,23 +18,35 @@
 package org.apache.servicecomb.foundation.vertx.server;
 
 import java.net.InetSocketAddress;
+import java.util.concurrent.atomic.AtomicInteger;
 
+import org.apache.servicecomb.foundation.common.event.EventManager;
 import org.apache.servicecomb.foundation.common.net.URIEndpointObject;
 import org.apache.servicecomb.foundation.ssl.SSLCustom;
 import org.apache.servicecomb.foundation.ssl.SSLOption;
 import org.apache.servicecomb.foundation.ssl.SSLOptionFactory;
 import org.apache.servicecomb.foundation.vertx.AsyncResultCallback;
+import org.apache.servicecomb.foundation.vertx.ClientConnectedEvent;
 import org.apache.servicecomb.foundation.vertx.VertxTLSBuilder;
 
+import com.netflix.config.DynamicPropertyFactory;
+
 import io.vertx.core.Vertx;
 import io.vertx.core.net.NetServer;
 import io.vertx.core.net.NetServerOptions;
 
 public class TcpServer {
   private URIEndpointObject endpointObject;
 
+  private final AtomicInteger connectedCounter;
 
 Review comment:
   sorry, forgotten


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:
us...@infra.apache.org


> highway server not accept too many connection
> -
>
> Key: SCB-687
> URL: https://issues.apache.org/jira/browse/SCB-687
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: yangyongzheng
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-687) highway server not accept too many connection

2018-07-20 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16550317#comment-16550317
 ] 

ASF GitHub Bot commented on SCB-687:


zhengyangyong commented on a change in pull request #824: [SCB-687] add highway 
server connection protection
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/824#discussion_r203955004
 
 

 ##
 File path: 
integration-tests/spring-pojo-tests/src/test/java/org/apache/servicecomb/demo/pojo/test/ConnectionEventWatcher.java
 ##
 @@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.demo.pojo.test;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.servicecomb.foundation.vertx.ClientClosedEvent;
+import org.apache.servicecomb.foundation.vertx.ClientConnectedEvent;
+
+import com.google.common.eventbus.Subscribe;
+
+public class ConnectionEventWatcher {
+  private final List counters = new ArrayList<>();
+
+  public List getCounters() {
+return counters;
+  }
+
+  @Subscribe
 
 Review comment:
   only for test
   ```java
   Assert.assertArrayEquals("check connection count change", new Integer[] {1, 
0}, watcher.getCounters().toArray());
   ```
   watcher will receive a connection connected event when consumer calling
   event.getTotalConnectedCount() = 1
   and when 
   ```java
   SCBEngine.getInstance().destroy();
   ```
   watcher will receive a connection close event
   event.getTotalConnectedCount() = 0
   


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:
us...@infra.apache.org


> highway server not accept too many connection
> -
>
> Key: SCB-687
> URL: https://issues.apache.org/jira/browse/SCB-687
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: yangyongzheng
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-687) highway server not accept too many connection

2018-07-20 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16550310#comment-16550310
 ] 

ASF GitHub Bot commented on SCB-687:


wujimin commented on a change in pull request #824: [SCB-687] add highway 
server connection protection
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/824#discussion_r203954150
 
 

 ##
 File path: 
foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/server/TcpServer.java
 ##
 @@ -18,23 +18,35 @@
 package org.apache.servicecomb.foundation.vertx.server;
 
 import java.net.InetSocketAddress;
+import java.util.concurrent.atomic.AtomicInteger;
 
+import org.apache.servicecomb.foundation.common.event.EventManager;
 import org.apache.servicecomb.foundation.common.net.URIEndpointObject;
 import org.apache.servicecomb.foundation.ssl.SSLCustom;
 import org.apache.servicecomb.foundation.ssl.SSLOption;
 import org.apache.servicecomb.foundation.ssl.SSLOptionFactory;
 import org.apache.servicecomb.foundation.vertx.AsyncResultCallback;
+import org.apache.servicecomb.foundation.vertx.ClientConnectedEvent;
 import org.apache.servicecomb.foundation.vertx.VertxTLSBuilder;
 
+import com.netflix.config.DynamicPropertyFactory;
+
 import io.vertx.core.Vertx;
 import io.vertx.core.net.NetServer;
 import io.vertx.core.net.NetServerOptions;
 
 public class TcpServer {
   private URIEndpointObject endpointObject;
 
+  private final AtomicInteger connectedCounter;
 
 Review comment:
   if serivcecomb.highway.thread-count is n, then HighwayServerVerticle  
instance count is n


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:
us...@infra.apache.org


> highway server not accept too many connection
> -
>
> Key: SCB-687
> URL: https://issues.apache.org/jira/browse/SCB-687
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: yangyongzheng
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-687) highway server not accept too many connection

2018-07-20 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16550308#comment-16550308
 ] 

ASF GitHub Bot commented on SCB-687:


wujimin commented on a change in pull request #824: [SCB-687] add highway 
server connection protection
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/824#discussion_r203953876
 
 

 ##
 File path: 
integration-tests/spring-pojo-tests/src/test/java/org/apache/servicecomb/demo/pojo/test/ConnectionEventWatcher.java
 ##
 @@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.demo.pojo.test;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.servicecomb.foundation.vertx.ClientClosedEvent;
+import org.apache.servicecomb.foundation.vertx.ClientConnectedEvent;
+
+import com.google.common.eventbus.Subscribe;
+
+public class ConnectionEventWatcher {
+  private final List counters = new ArrayList<>();
+
+  public List getCounters() {
+return counters;
+  }
+
+  @Subscribe
 
 Review comment:
   what's this watcher purpose?


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:
us...@infra.apache.org


> highway server not accept too many connection
> -
>
> Key: SCB-687
> URL: https://issues.apache.org/jira/browse/SCB-687
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: yangyongzheng
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-687) highway server not accept too many connection

2018-07-20 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16550307#comment-16550307
 ] 

ASF GitHub Bot commented on SCB-687:


wujimin commented on a change in pull request #824: [SCB-687] add highway 
server connection protection
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/824#discussion_r203953811
 
 

 ##
 File path: 
integration-tests/spring-pojo-tests/src/test/java/org/apache/servicecomb/demo/pojo/test/ConnectionEventWatcher.java
 ##
 @@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.demo.pojo.test;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.servicecomb.foundation.vertx.ClientClosedEvent;
+import org.apache.servicecomb.foundation.vertx.ClientConnectedEvent;
+
+import com.google.common.eventbus.Subscribe;
+
+public class ConnectionEventWatcher {
+  private final List counters = new ArrayList<>();
+
+  public List getCounters() {
+return counters;
+  }
+
+  @Subscribe
 
 Review comment:
   all eventloop thread will sync invoke this
   it's not a good sample.


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:
us...@infra.apache.org


> highway server not accept too many connection
> -
>
> Key: SCB-687
> URL: https://issues.apache.org/jira/browse/SCB-687
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: yangyongzheng
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-687) highway server not accept too many connection

2018-07-20 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16550305#comment-16550305
 ] 

ASF GitHub Bot commented on SCB-687:


wujimin commented on a change in pull request #824: [SCB-687] add highway 
server connection protection
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/824#discussion_r203953673
 
 

 ##
 File path: 
integration-tests/spring-pojo-connection-limit-test/src/test/resources/microservice.yaml
 ##
 @@ -0,0 +1,29 @@
+## ---
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##  http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---
+
+APPLICATION_ID: pojotest-it
+service_description:
+  name: pojo
+  version: 0.0.4
+servicecomb:
+  service:
+registry:
+  address: http://127.0.0.1:30100
+  highway:
+address: 0.0.0.0:7070
+server:
+  connection-limit: 0
 
 Review comment:
   consider dynamic update?


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:
us...@infra.apache.org


> highway server not accept too many connection
> -
>
> Key: SCB-687
> URL: https://issues.apache.org/jira/browse/SCB-687
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: yangyongzheng
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-687) highway server not accept too many connection

2018-07-20 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16550303#comment-16550303
 ] 

ASF GitHub Bot commented on SCB-687:


wujimin commented on a change in pull request #824: [SCB-687] add highway 
server connection protection
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/824#discussion_r203953556
 
 

 ##
 File path: 
integration-tests/spring-pojo-connection-limit-test/src/test/resources/log4j.properties
 ##
 @@ -0,0 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+log4j.rootLogger=INFO, stdout
 
 Review comment:
   new projects switch to logback?


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:
us...@infra.apache.org


> highway server not accept too many connection
> -
>
> Key: SCB-687
> URL: https://issues.apache.org/jira/browse/SCB-687
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: yangyongzheng
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-687) highway server not accept too many connection

2018-07-20 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16550304#comment-16550304
 ] 

ASF GitHub Bot commented on SCB-687:


zhengyangyong commented on a change in pull request #824: [SCB-687] add highway 
server connection protection
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/824#discussion_r203953650
 
 

 ##
 File path: 
foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/server/TcpServer.java
 ##
 @@ -18,23 +18,35 @@
 package org.apache.servicecomb.foundation.vertx.server;
 
 import java.net.InetSocketAddress;
+import java.util.concurrent.atomic.AtomicInteger;
 
+import org.apache.servicecomb.foundation.common.event.EventManager;
 import org.apache.servicecomb.foundation.common.net.URIEndpointObject;
 import org.apache.servicecomb.foundation.ssl.SSLCustom;
 import org.apache.servicecomb.foundation.ssl.SSLOption;
 import org.apache.servicecomb.foundation.ssl.SSLOptionFactory;
 import org.apache.servicecomb.foundation.vertx.AsyncResultCallback;
+import org.apache.servicecomb.foundation.vertx.ClientConnectedEvent;
 import org.apache.servicecomb.foundation.vertx.VertxTLSBuilder;
 
+import com.netflix.config.DynamicPropertyFactory;
+
 import io.vertx.core.Vertx;
 import io.vertx.core.net.NetServer;
 import io.vertx.core.net.NetServerOptions;
 
 public class TcpServer {
   private URIEndpointObject endpointObject;
 
+  private final AtomicInteger connectedCounter;
 
 Review comment:
   I think we only deploy one HighwayServerVerticle instance (as a spring 
bean), so may not problem ?


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:
us...@infra.apache.org


> highway server not accept too many connection
> -
>
> Key: SCB-687
> URL: https://issues.apache.org/jira/browse/SCB-687
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: yangyongzheng
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-687) highway server not accept too many connection

2018-07-19 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16550298#comment-16550298
 ] 

ASF GitHub Bot commented on SCB-687:


zhengyangyong commented on a change in pull request #824: [SCB-687] add highway 
server connection protection
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/824#discussion_r203951323
 
 

 ##
 File path: 
foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/server/TcpServer.java
 ##
 @@ -18,23 +18,35 @@
 package org.apache.servicecomb.foundation.vertx.server;
 
 import java.net.InetSocketAddress;
+import java.util.concurrent.atomic.AtomicInteger;
 
+import org.apache.servicecomb.foundation.common.event.EventManager;
 import org.apache.servicecomb.foundation.common.net.URIEndpointObject;
 import org.apache.servicecomb.foundation.ssl.SSLCustom;
 import org.apache.servicecomb.foundation.ssl.SSLOption;
 import org.apache.servicecomb.foundation.ssl.SSLOptionFactory;
 import org.apache.servicecomb.foundation.vertx.AsyncResultCallback;
+import org.apache.servicecomb.foundation.vertx.ClientConnectedEvent;
 import org.apache.servicecomb.foundation.vertx.VertxTLSBuilder;
 
+import com.netflix.config.DynamicPropertyFactory;
+
 import io.vertx.core.Vertx;
 import io.vertx.core.net.NetServer;
 import io.vertx.core.net.NetServerOptions;
 
 public class TcpServer {
   private URIEndpointObject endpointObject;
 
+  private final AtomicInteger connectedCounter;
 
 Review comment:
   your means I need move it to HighwayServerVerticle instance?


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:
us...@infra.apache.org


> highway server not accept too many connection
> -
>
> Key: SCB-687
> URL: https://issues.apache.org/jira/browse/SCB-687
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: yangyongzheng
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-687) highway server not accept too many connection

2018-07-19 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16550293#comment-16550293
 ] 

ASF GitHub Bot commented on SCB-687:


wujimin commented on a change in pull request #824: [SCB-687] add highway 
server connection protection
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/824#discussion_r203948367
 
 

 ##
 File path: 
foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/server/TcpServer.java
 ##
 @@ -18,23 +18,35 @@
 package org.apache.servicecomb.foundation.vertx.server;
 
 import java.net.InetSocketAddress;
+import java.util.concurrent.atomic.AtomicInteger;
 
+import org.apache.servicecomb.foundation.common.event.EventManager;
 import org.apache.servicecomb.foundation.common.net.URIEndpointObject;
 import org.apache.servicecomb.foundation.ssl.SSLCustom;
 import org.apache.servicecomb.foundation.ssl.SSLOption;
 import org.apache.servicecomb.foundation.ssl.SSLOptionFactory;
 import org.apache.servicecomb.foundation.vertx.AsyncResultCallback;
+import org.apache.servicecomb.foundation.vertx.ClientConnectedEvent;
 import org.apache.servicecomb.foundation.vertx.VertxTLSBuilder;
 
+import com.netflix.config.DynamicPropertyFactory;
+
 import io.vertx.core.Vertx;
 import io.vertx.core.net.NetServer;
 import io.vertx.core.net.NetServerOptions;
 
 public class TcpServer {
   private URIEndpointObject endpointObject;
 
+  private final AtomicInteger connectedCounter;
 
 Review comment:
   TcpServer  will be created for each HighwayServerVerticle instance
   so the counter number in server is not correct.


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:
us...@infra.apache.org


> highway server not accept too many connection
> -
>
> Key: SCB-687
> URL: https://issues.apache.org/jira/browse/SCB-687
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: yangyongzheng
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-687) highway server not accept too many connection

2018-07-19 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16550171#comment-16550171
 ] 

ASF GitHub Bot commented on SCB-687:


wujimin commented on a change in pull request #824: [SCB-687] add highway 
server connection protection
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/824#discussion_r203929543
 
 

 ##
 File path: 
foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/server/TcpServer.java
 ##
 @@ -57,8 +69,18 @@ public void init(Vertx vertx, String sslKey, 
AsyncResultCallback {
-  TcpServerConnection connection = createTcpServerConnection();
-  connection.init(netSocket);
+  if (connectedCounter.get() < connectionLimit) {
 
 Review comment:
   seems this is more clear.
   ```
   if (connectedCounter.incrementAndGet() > connectionLimit){
 connectedCounter.decrementAndGet();
 netSocket.close();
 return;
   }
   
   TcpServerConnection connection = createTcpServerConnection();
   connection.init(netSocket, connectedCounter);
   EventManager.post(new ClientConnectedEvent(netSocket, connectedCount));
   ```


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:
us...@infra.apache.org


> highway server not accept too many connection
> -
>
> Key: SCB-687
> URL: https://issues.apache.org/jira/browse/SCB-687
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: yangyongzheng
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-687) highway server not accept too many connection

2018-07-19 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16550104#comment-16550104
 ] 

ASF GitHub Bot commented on SCB-687:


coveralls commented on issue #824: [SCB-687] add highway server connection 
protection
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/824#issuecomment-406465050
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/18077099/badge)](https://coveralls.io/builds/18077099)
   
   Coverage decreased (-0.04%) to 87.041% when pulling 
**2bf89b0a4b2ea14af9862990e4bad5da0d56651a on zhengyangyong:SCB-687** into 
**8227f0ccbe7d69db51df1fc22b11a364662c1d9d on apache:master**.
   


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:
us...@infra.apache.org


> highway server not accept too many connection
> -
>
> Key: SCB-687
> URL: https://issues.apache.org/jira/browse/SCB-687
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: yangyongzheng
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-687) highway server not accept too many connection

2018-07-19 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16550089#comment-16550089
 ] 

ASF GitHub Bot commented on SCB-687:


zhengyangyong opened a new pull request #824: [SCB-687] add highway server 
connection protection
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/824
 
 
   Follow this checklist to help us incorporate your contribution quickly and 
easily:
   
- [ ] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually 
before you start working on it).  Trivial changes like typos do not require a 
JIRA issue.  Your pull request should address just this issue, without pulling 
in other changes.
- [ ] Each commit in the pull request should have a meaningful subject line 
and body.
- [ ] Format the pull request title like `[SCB-XXX] Fixes bug in 
ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA 
issue.
- [ ] Write a pull request description that is detailed enough to 
understand what the pull request does, how, and why.
- [ ] Run `mvn clean install` to make sure basic checks pass. A more 
thorough check will be performed on your pull request automatically.
- [ ] If this contribution is large, please file an Apache [Individual 
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   ---
   
   Add `servicecomb.highway.server.connection-limit` for setting this limit
   Default value is Integer.MAX_VALUE
   


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:
us...@infra.apache.org


> highway server not accept too many connection
> -
>
> Key: SCB-687
> URL: https://issues.apache.org/jira/browse/SCB-687
> Project: Apache ServiceComb
>  Issue Type: Sub-task
>  Components: Java-Chassis
>Reporter: wujimin
>Assignee: yangyongzheng
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)