How to know how many connections are connecting with SpringBoot website?
up vote
2
down vote
favorite
The SpringBoot website is deployed in Linux server, and its port number is 9010. We know that netstat is useful to check how many TCP connections are connected to the Linux server.
Now I want to know how many connections are connected with my website. I use command as below:
netstat -an | grep :9010 -c
There are so many connections here. And many of them are in status TIME_WAIT. I know this means that it is going to close.
If I am counting how many http requests SpringBoot is handling at the exact time, should I count the TIME_WAIT connections?
Can anyone give some clue? Thanks.
spring spring-boot tcp
add a comment |
up vote
2
down vote
favorite
The SpringBoot website is deployed in Linux server, and its port number is 9010. We know that netstat is useful to check how many TCP connections are connected to the Linux server.
Now I want to know how many connections are connected with my website. I use command as below:
netstat -an | grep :9010 -c
There are so many connections here. And many of them are in status TIME_WAIT. I know this means that it is going to close.
If I am counting how many http requests SpringBoot is handling at the exact time, should I count the TIME_WAIT connections?
Can anyone give some clue? Thanks.
spring spring-boot tcp
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
The SpringBoot website is deployed in Linux server, and its port number is 9010. We know that netstat is useful to check how many TCP connections are connected to the Linux server.
Now I want to know how many connections are connected with my website. I use command as below:
netstat -an | grep :9010 -c
There are so many connections here. And many of them are in status TIME_WAIT. I know this means that it is going to close.
If I am counting how many http requests SpringBoot is handling at the exact time, should I count the TIME_WAIT connections?
Can anyone give some clue? Thanks.
spring spring-boot tcp
The SpringBoot website is deployed in Linux server, and its port number is 9010. We know that netstat is useful to check how many TCP connections are connected to the Linux server.
Now I want to know how many connections are connected with my website. I use command as below:
netstat -an | grep :9010 -c
There are so many connections here. And many of them are in status TIME_WAIT. I know this means that it is going to close.
If I am counting how many http requests SpringBoot is handling at the exact time, should I count the TIME_WAIT connections?
Can anyone give some clue? Thanks.
spring spring-boot tcp
spring spring-boot tcp
edited Nov 22 at 1:58
asked Nov 20 at 3:21
Robin Sun
1291214
1291214
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
up vote
0
down vote
accepted
Maybe the question here is not very clear. "How many connections"? The connections can in various status. And often, many of them are in TIME_WAIT.
Maybe I should say, if I want to know how many connections(web request) the Website is processing at the exacte timestap, I can use below comannd:
netstat -an |grep -c 9010.*ESTABLISHED
But if I want to know how many connections(web request) the website has processed around the timestamp(maybe in 60 seconds), I can use below command:
netstat -an | grep :9010 -c
Because TIME_WAIT means this request was processed short time ago(For simple, I don't count the Keep-Alive situation).
Anyone has different opinions? Looking forward reply.
add a comment |
up vote
0
down vote
You can also use Actuator plugin inside Spring Boot Application.
Apart from several monitoring endpoints exposed by it, you can also monitor number of http connections to your application.
References:
https://www.callicoder.com/spring-boot-actuator/
UPDATE:
To know number of http sessions use "/actuator/sessions" endpoint.
More details are here:
https://moelholm.com/2016/08/22/spring-boot-sessions-actuator-endpoint/
Hi Ankit, I already tried the Spring Actuator. I only find session amount in the exposed endpoint. But this is session objects in tomcat, not http connections. Could you please tell me the exact endpoint name? Many thanks.
– Robin Sun
Nov 28 at 9:12
@RobinSun: find updated answer. If you find post useful, kindly upvote it / accept the answer.
– Ankit
Nov 28 at 10:10
thanks for the effort. But this is still about session objects in tomcat. Not really TCP connections.
– Robin Sun
Nov 29 at 1:47
add a comment |
up vote
-1
down vote
Try to run
lsof -i |grep -c 9010.*ESTABLISHED
3
Welcome to StackOverflow! Please try to add more details/explanation in addition to the commands/code so that it may help the users looking for an answer.
– Uzair A.
Nov 20 at 4:34
This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review
– Zooly
Nov 20 at 13:17
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53385737%2fhow-to-know-how-many-connections-are-connecting-with-springboot-website%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
Maybe the question here is not very clear. "How many connections"? The connections can in various status. And often, many of them are in TIME_WAIT.
Maybe I should say, if I want to know how many connections(web request) the Website is processing at the exacte timestap, I can use below comannd:
netstat -an |grep -c 9010.*ESTABLISHED
But if I want to know how many connections(web request) the website has processed around the timestamp(maybe in 60 seconds), I can use below command:
netstat -an | grep :9010 -c
Because TIME_WAIT means this request was processed short time ago(For simple, I don't count the Keep-Alive situation).
Anyone has different opinions? Looking forward reply.
add a comment |
up vote
0
down vote
accepted
Maybe the question here is not very clear. "How many connections"? The connections can in various status. And often, many of them are in TIME_WAIT.
Maybe I should say, if I want to know how many connections(web request) the Website is processing at the exacte timestap, I can use below comannd:
netstat -an |grep -c 9010.*ESTABLISHED
But if I want to know how many connections(web request) the website has processed around the timestamp(maybe in 60 seconds), I can use below command:
netstat -an | grep :9010 -c
Because TIME_WAIT means this request was processed short time ago(For simple, I don't count the Keep-Alive situation).
Anyone has different opinions? Looking forward reply.
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
Maybe the question here is not very clear. "How many connections"? The connections can in various status. And often, many of them are in TIME_WAIT.
Maybe I should say, if I want to know how many connections(web request) the Website is processing at the exacte timestap, I can use below comannd:
netstat -an |grep -c 9010.*ESTABLISHED
But if I want to know how many connections(web request) the website has processed around the timestamp(maybe in 60 seconds), I can use below command:
netstat -an | grep :9010 -c
Because TIME_WAIT means this request was processed short time ago(For simple, I don't count the Keep-Alive situation).
Anyone has different opinions? Looking forward reply.
Maybe the question here is not very clear. "How many connections"? The connections can in various status. And often, many of them are in TIME_WAIT.
Maybe I should say, if I want to know how many connections(web request) the Website is processing at the exacte timestap, I can use below comannd:
netstat -an |grep -c 9010.*ESTABLISHED
But if I want to know how many connections(web request) the website has processed around the timestamp(maybe in 60 seconds), I can use below command:
netstat -an | grep :9010 -c
Because TIME_WAIT means this request was processed short time ago(For simple, I don't count the Keep-Alive situation).
Anyone has different opinions? Looking forward reply.
edited Nov 28 at 8:27
answered Nov 28 at 8:19
Robin Sun
1291214
1291214
add a comment |
add a comment |
up vote
0
down vote
You can also use Actuator plugin inside Spring Boot Application.
Apart from several monitoring endpoints exposed by it, you can also monitor number of http connections to your application.
References:
https://www.callicoder.com/spring-boot-actuator/
UPDATE:
To know number of http sessions use "/actuator/sessions" endpoint.
More details are here:
https://moelholm.com/2016/08/22/spring-boot-sessions-actuator-endpoint/
Hi Ankit, I already tried the Spring Actuator. I only find session amount in the exposed endpoint. But this is session objects in tomcat, not http connections. Could you please tell me the exact endpoint name? Many thanks.
– Robin Sun
Nov 28 at 9:12
@RobinSun: find updated answer. If you find post useful, kindly upvote it / accept the answer.
– Ankit
Nov 28 at 10:10
thanks for the effort. But this is still about session objects in tomcat. Not really TCP connections.
– Robin Sun
Nov 29 at 1:47
add a comment |
up vote
0
down vote
You can also use Actuator plugin inside Spring Boot Application.
Apart from several monitoring endpoints exposed by it, you can also monitor number of http connections to your application.
References:
https://www.callicoder.com/spring-boot-actuator/
UPDATE:
To know number of http sessions use "/actuator/sessions" endpoint.
More details are here:
https://moelholm.com/2016/08/22/spring-boot-sessions-actuator-endpoint/
Hi Ankit, I already tried the Spring Actuator. I only find session amount in the exposed endpoint. But this is session objects in tomcat, not http connections. Could you please tell me the exact endpoint name? Many thanks.
– Robin Sun
Nov 28 at 9:12
@RobinSun: find updated answer. If you find post useful, kindly upvote it / accept the answer.
– Ankit
Nov 28 at 10:10
thanks for the effort. But this is still about session objects in tomcat. Not really TCP connections.
– Robin Sun
Nov 29 at 1:47
add a comment |
up vote
0
down vote
up vote
0
down vote
You can also use Actuator plugin inside Spring Boot Application.
Apart from several monitoring endpoints exposed by it, you can also monitor number of http connections to your application.
References:
https://www.callicoder.com/spring-boot-actuator/
UPDATE:
To know number of http sessions use "/actuator/sessions" endpoint.
More details are here:
https://moelholm.com/2016/08/22/spring-boot-sessions-actuator-endpoint/
You can also use Actuator plugin inside Spring Boot Application.
Apart from several monitoring endpoints exposed by it, you can also monitor number of http connections to your application.
References:
https://www.callicoder.com/spring-boot-actuator/
UPDATE:
To know number of http sessions use "/actuator/sessions" endpoint.
More details are here:
https://moelholm.com/2016/08/22/spring-boot-sessions-actuator-endpoint/
edited Nov 28 at 10:09
answered Nov 28 at 8:35
Ankit
55121338
55121338
Hi Ankit, I already tried the Spring Actuator. I only find session amount in the exposed endpoint. But this is session objects in tomcat, not http connections. Could you please tell me the exact endpoint name? Many thanks.
– Robin Sun
Nov 28 at 9:12
@RobinSun: find updated answer. If you find post useful, kindly upvote it / accept the answer.
– Ankit
Nov 28 at 10:10
thanks for the effort. But this is still about session objects in tomcat. Not really TCP connections.
– Robin Sun
Nov 29 at 1:47
add a comment |
Hi Ankit, I already tried the Spring Actuator. I only find session amount in the exposed endpoint. But this is session objects in tomcat, not http connections. Could you please tell me the exact endpoint name? Many thanks.
– Robin Sun
Nov 28 at 9:12
@RobinSun: find updated answer. If you find post useful, kindly upvote it / accept the answer.
– Ankit
Nov 28 at 10:10
thanks for the effort. But this is still about session objects in tomcat. Not really TCP connections.
– Robin Sun
Nov 29 at 1:47
Hi Ankit, I already tried the Spring Actuator. I only find session amount in the exposed endpoint. But this is session objects in tomcat, not http connections. Could you please tell me the exact endpoint name? Many thanks.
– Robin Sun
Nov 28 at 9:12
Hi Ankit, I already tried the Spring Actuator. I only find session amount in the exposed endpoint. But this is session objects in tomcat, not http connections. Could you please tell me the exact endpoint name? Many thanks.
– Robin Sun
Nov 28 at 9:12
@RobinSun: find updated answer. If you find post useful, kindly upvote it / accept the answer.
– Ankit
Nov 28 at 10:10
@RobinSun: find updated answer. If you find post useful, kindly upvote it / accept the answer.
– Ankit
Nov 28 at 10:10
thanks for the effort. But this is still about session objects in tomcat. Not really TCP connections.
– Robin Sun
Nov 29 at 1:47
thanks for the effort. But this is still about session objects in tomcat. Not really TCP connections.
– Robin Sun
Nov 29 at 1:47
add a comment |
up vote
-1
down vote
Try to run
lsof -i |grep -c 9010.*ESTABLISHED
3
Welcome to StackOverflow! Please try to add more details/explanation in addition to the commands/code so that it may help the users looking for an answer.
– Uzair A.
Nov 20 at 4:34
This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review
– Zooly
Nov 20 at 13:17
add a comment |
up vote
-1
down vote
Try to run
lsof -i |grep -c 9010.*ESTABLISHED
3
Welcome to StackOverflow! Please try to add more details/explanation in addition to the commands/code so that it may help the users looking for an answer.
– Uzair A.
Nov 20 at 4:34
This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review
– Zooly
Nov 20 at 13:17
add a comment |
up vote
-1
down vote
up vote
-1
down vote
Try to run
lsof -i |grep -c 9010.*ESTABLISHED
Try to run
lsof -i |grep -c 9010.*ESTABLISHED
answered Nov 20 at 4:22
sergey_liu
1
1
3
Welcome to StackOverflow! Please try to add more details/explanation in addition to the commands/code so that it may help the users looking for an answer.
– Uzair A.
Nov 20 at 4:34
This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review
– Zooly
Nov 20 at 13:17
add a comment |
3
Welcome to StackOverflow! Please try to add more details/explanation in addition to the commands/code so that it may help the users looking for an answer.
– Uzair A.
Nov 20 at 4:34
This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review
– Zooly
Nov 20 at 13:17
3
3
Welcome to StackOverflow! Please try to add more details/explanation in addition to the commands/code so that it may help the users looking for an answer.
– Uzair A.
Nov 20 at 4:34
Welcome to StackOverflow! Please try to add more details/explanation in addition to the commands/code so that it may help the users looking for an answer.
– Uzair A.
Nov 20 at 4:34
This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review
– Zooly
Nov 20 at 13:17
This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review
– Zooly
Nov 20 at 13:17
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53385737%2fhow-to-know-how-many-connections-are-connecting-with-springboot-website%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown