Tomcat is very slow when uploading files on localhost with HTTPS
up vote
0
down vote
favorite
Tomcat is very slow when uploading files on localhost with HTTPS
Host1:
IP: 192.168.9.13
VIP: 192.168.9.12
Service: nginx+keepalived,tomcat
Host2:
IP: 192.168.9.14
Service: nginx+keepalived,tomcat
Tomcat:
Http Port: 8080
Https Port: 8124
Nginx:
Https Port: 8443
nginx upstream use ip_hash
it is very slow when nginx and tomcat is same host, like this:
Client-----(https)----->Nginx-----(https)----->Tomcat
192.168.9.13 192.168.9.13
So, skip nginx to test upload file
Host1 192.168.9.13:
HTTP request:
$ time curl -X POST http://192.168.9.13:8080/secwechat/admin/app/upload -F "apk=@/home/temp/QQ_7.6.3.apk" -H "token: 9035cf1720554bb7a912fb208ebc4c1c"
real 0m0.430s
user 0m0.007s
sys 0m0.028s
$ time curl -X POST http://192.168.9.14:8080/secwechat/admin/app/upload -F "apk=@/home/temp/QQ_7.6.3.apk" -H "token: 25f3ad9323744c7aab00f53950369f0c"
real 0m0.430s
user 0m0.013s
sys 0m0.023s
HTTPS request
$ time curl -k -X POST http://192.168.9.13:8124/secwechat/admin/app/upload -F "apk=@/home/temp/QQ_7.6.3.apk" -H "token: 9035cf1720554bb7a912fb208ebc4c1c"
real 4m18.691s
user 0m0.285s
sys 0m0.067s
$ time curl -k -X POST http://192.168.9.14:8124/secwechat/admin/app/upload -F "apk=@/home/temp/QQ_7.6.3.apk" -H "token: 25f3ad9323744c7aab00f53950369f0c"
real 0m0.430s
user 0m0.011s
sys 0m0.022s
Host2 192.168.9.14:
HTTP request:
$ time curl -X POST http://192.168.9.13:8080/secwechat/admin/app/upload -F "apk=@/home/temp/QQ_7.6.3.apk" -H "token: 9035cf1720554bb7a912fb208ebc4c1c"
real 0m0.430s
user 0m0.009s
sys 0m0.027s
$ time curl -X POST http://192.168.9.14:8080/secwechat/admin/app/upload -F "apk=@/home/temp/QQ_7.6.3.apk" -H "token: 25f3ad9323744c7aab00f53950369f0c"
real 0m0.430s
user 0m0.013s
sys 0m0.025s
HTTPS request
$ time curl -k -X POST http://192.168.9.13:8124/secwechat/admin/app/upload -F "apk=@/home/temp/QQ_7.6.3.apk" -H "token: 9035cf1720554bb7a912fb208ebc4c1c"
real 0m0.430s
user 0m0.010s
sys 0m0.027s
$ time curl -k -X POST http://192.168.9.14:8124/secwechat/admin/app/upload -F "apk=@/home/temp/QQ_7.6.3.apk" -H "token: 25f3ad9323744c7aab00f53950369f0c"
real 4m32.329s
user 0m0.290s
sys 0m0.081s
According to the results, when Client
or proxy
is same host with tomcat server and tomcat use SSL, uploading file is very slow.
How can i to solve this problem?
performance tomcat https localhost
New contributor
add a comment |
up vote
0
down vote
favorite
Tomcat is very slow when uploading files on localhost with HTTPS
Host1:
IP: 192.168.9.13
VIP: 192.168.9.12
Service: nginx+keepalived,tomcat
Host2:
IP: 192.168.9.14
Service: nginx+keepalived,tomcat
Tomcat:
Http Port: 8080
Https Port: 8124
Nginx:
Https Port: 8443
nginx upstream use ip_hash
it is very slow when nginx and tomcat is same host, like this:
Client-----(https)----->Nginx-----(https)----->Tomcat
192.168.9.13 192.168.9.13
So, skip nginx to test upload file
Host1 192.168.9.13:
HTTP request:
$ time curl -X POST http://192.168.9.13:8080/secwechat/admin/app/upload -F "apk=@/home/temp/QQ_7.6.3.apk" -H "token: 9035cf1720554bb7a912fb208ebc4c1c"
real 0m0.430s
user 0m0.007s
sys 0m0.028s
$ time curl -X POST http://192.168.9.14:8080/secwechat/admin/app/upload -F "apk=@/home/temp/QQ_7.6.3.apk" -H "token: 25f3ad9323744c7aab00f53950369f0c"
real 0m0.430s
user 0m0.013s
sys 0m0.023s
HTTPS request
$ time curl -k -X POST http://192.168.9.13:8124/secwechat/admin/app/upload -F "apk=@/home/temp/QQ_7.6.3.apk" -H "token: 9035cf1720554bb7a912fb208ebc4c1c"
real 4m18.691s
user 0m0.285s
sys 0m0.067s
$ time curl -k -X POST http://192.168.9.14:8124/secwechat/admin/app/upload -F "apk=@/home/temp/QQ_7.6.3.apk" -H "token: 25f3ad9323744c7aab00f53950369f0c"
real 0m0.430s
user 0m0.011s
sys 0m0.022s
Host2 192.168.9.14:
HTTP request:
$ time curl -X POST http://192.168.9.13:8080/secwechat/admin/app/upload -F "apk=@/home/temp/QQ_7.6.3.apk" -H "token: 9035cf1720554bb7a912fb208ebc4c1c"
real 0m0.430s
user 0m0.009s
sys 0m0.027s
$ time curl -X POST http://192.168.9.14:8080/secwechat/admin/app/upload -F "apk=@/home/temp/QQ_7.6.3.apk" -H "token: 25f3ad9323744c7aab00f53950369f0c"
real 0m0.430s
user 0m0.013s
sys 0m0.025s
HTTPS request
$ time curl -k -X POST http://192.168.9.13:8124/secwechat/admin/app/upload -F "apk=@/home/temp/QQ_7.6.3.apk" -H "token: 9035cf1720554bb7a912fb208ebc4c1c"
real 0m0.430s
user 0m0.010s
sys 0m0.027s
$ time curl -k -X POST http://192.168.9.14:8124/secwechat/admin/app/upload -F "apk=@/home/temp/QQ_7.6.3.apk" -H "token: 25f3ad9323744c7aab00f53950369f0c"
real 4m32.329s
user 0m0.290s
sys 0m0.081s
According to the results, when Client
or proxy
is same host with tomcat server and tomcat use SSL, uploading file is very slow.
How can i to solve this problem?
performance tomcat https localhost
New contributor
You may have an slow SSL handshake. Capture packets with Wireshark and troubleshoot that.
– Luis Muñoz
Nov 8 at 15:09
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Tomcat is very slow when uploading files on localhost with HTTPS
Host1:
IP: 192.168.9.13
VIP: 192.168.9.12
Service: nginx+keepalived,tomcat
Host2:
IP: 192.168.9.14
Service: nginx+keepalived,tomcat
Tomcat:
Http Port: 8080
Https Port: 8124
Nginx:
Https Port: 8443
nginx upstream use ip_hash
it is very slow when nginx and tomcat is same host, like this:
Client-----(https)----->Nginx-----(https)----->Tomcat
192.168.9.13 192.168.9.13
So, skip nginx to test upload file
Host1 192.168.9.13:
HTTP request:
$ time curl -X POST http://192.168.9.13:8080/secwechat/admin/app/upload -F "apk=@/home/temp/QQ_7.6.3.apk" -H "token: 9035cf1720554bb7a912fb208ebc4c1c"
real 0m0.430s
user 0m0.007s
sys 0m0.028s
$ time curl -X POST http://192.168.9.14:8080/secwechat/admin/app/upload -F "apk=@/home/temp/QQ_7.6.3.apk" -H "token: 25f3ad9323744c7aab00f53950369f0c"
real 0m0.430s
user 0m0.013s
sys 0m0.023s
HTTPS request
$ time curl -k -X POST http://192.168.9.13:8124/secwechat/admin/app/upload -F "apk=@/home/temp/QQ_7.6.3.apk" -H "token: 9035cf1720554bb7a912fb208ebc4c1c"
real 4m18.691s
user 0m0.285s
sys 0m0.067s
$ time curl -k -X POST http://192.168.9.14:8124/secwechat/admin/app/upload -F "apk=@/home/temp/QQ_7.6.3.apk" -H "token: 25f3ad9323744c7aab00f53950369f0c"
real 0m0.430s
user 0m0.011s
sys 0m0.022s
Host2 192.168.9.14:
HTTP request:
$ time curl -X POST http://192.168.9.13:8080/secwechat/admin/app/upload -F "apk=@/home/temp/QQ_7.6.3.apk" -H "token: 9035cf1720554bb7a912fb208ebc4c1c"
real 0m0.430s
user 0m0.009s
sys 0m0.027s
$ time curl -X POST http://192.168.9.14:8080/secwechat/admin/app/upload -F "apk=@/home/temp/QQ_7.6.3.apk" -H "token: 25f3ad9323744c7aab00f53950369f0c"
real 0m0.430s
user 0m0.013s
sys 0m0.025s
HTTPS request
$ time curl -k -X POST http://192.168.9.13:8124/secwechat/admin/app/upload -F "apk=@/home/temp/QQ_7.6.3.apk" -H "token: 9035cf1720554bb7a912fb208ebc4c1c"
real 0m0.430s
user 0m0.010s
sys 0m0.027s
$ time curl -k -X POST http://192.168.9.14:8124/secwechat/admin/app/upload -F "apk=@/home/temp/QQ_7.6.3.apk" -H "token: 25f3ad9323744c7aab00f53950369f0c"
real 4m32.329s
user 0m0.290s
sys 0m0.081s
According to the results, when Client
or proxy
is same host with tomcat server and tomcat use SSL, uploading file is very slow.
How can i to solve this problem?
performance tomcat https localhost
New contributor
Tomcat is very slow when uploading files on localhost with HTTPS
Host1:
IP: 192.168.9.13
VIP: 192.168.9.12
Service: nginx+keepalived,tomcat
Host2:
IP: 192.168.9.14
Service: nginx+keepalived,tomcat
Tomcat:
Http Port: 8080
Https Port: 8124
Nginx:
Https Port: 8443
nginx upstream use ip_hash
it is very slow when nginx and tomcat is same host, like this:
Client-----(https)----->Nginx-----(https)----->Tomcat
192.168.9.13 192.168.9.13
So, skip nginx to test upload file
Host1 192.168.9.13:
HTTP request:
$ time curl -X POST http://192.168.9.13:8080/secwechat/admin/app/upload -F "apk=@/home/temp/QQ_7.6.3.apk" -H "token: 9035cf1720554bb7a912fb208ebc4c1c"
real 0m0.430s
user 0m0.007s
sys 0m0.028s
$ time curl -X POST http://192.168.9.14:8080/secwechat/admin/app/upload -F "apk=@/home/temp/QQ_7.6.3.apk" -H "token: 25f3ad9323744c7aab00f53950369f0c"
real 0m0.430s
user 0m0.013s
sys 0m0.023s
HTTPS request
$ time curl -k -X POST http://192.168.9.13:8124/secwechat/admin/app/upload -F "apk=@/home/temp/QQ_7.6.3.apk" -H "token: 9035cf1720554bb7a912fb208ebc4c1c"
real 4m18.691s
user 0m0.285s
sys 0m0.067s
$ time curl -k -X POST http://192.168.9.14:8124/secwechat/admin/app/upload -F "apk=@/home/temp/QQ_7.6.3.apk" -H "token: 25f3ad9323744c7aab00f53950369f0c"
real 0m0.430s
user 0m0.011s
sys 0m0.022s
Host2 192.168.9.14:
HTTP request:
$ time curl -X POST http://192.168.9.13:8080/secwechat/admin/app/upload -F "apk=@/home/temp/QQ_7.6.3.apk" -H "token: 9035cf1720554bb7a912fb208ebc4c1c"
real 0m0.430s
user 0m0.009s
sys 0m0.027s
$ time curl -X POST http://192.168.9.14:8080/secwechat/admin/app/upload -F "apk=@/home/temp/QQ_7.6.3.apk" -H "token: 25f3ad9323744c7aab00f53950369f0c"
real 0m0.430s
user 0m0.013s
sys 0m0.025s
HTTPS request
$ time curl -k -X POST http://192.168.9.13:8124/secwechat/admin/app/upload -F "apk=@/home/temp/QQ_7.6.3.apk" -H "token: 9035cf1720554bb7a912fb208ebc4c1c"
real 0m0.430s
user 0m0.010s
sys 0m0.027s
$ time curl -k -X POST http://192.168.9.14:8124/secwechat/admin/app/upload -F "apk=@/home/temp/QQ_7.6.3.apk" -H "token: 25f3ad9323744c7aab00f53950369f0c"
real 4m32.329s
user 0m0.290s
sys 0m0.081s
According to the results, when Client
or proxy
is same host with tomcat server and tomcat use SSL, uploading file is very slow.
How can i to solve this problem?
performance tomcat https localhost
performance tomcat https localhost
New contributor
New contributor
New contributor
asked Nov 8 at 8:26
21 BH4CXJ
1
1
New contributor
New contributor
You may have an slow SSL handshake. Capture packets with Wireshark and troubleshoot that.
– Luis Muñoz
Nov 8 at 15:09
add a comment |
You may have an slow SSL handshake. Capture packets with Wireshark and troubleshoot that.
– Luis Muñoz
Nov 8 at 15:09
You may have an slow SSL handshake. Capture packets with Wireshark and troubleshoot that.
– Luis Muñoz
Nov 8 at 15:09
You may have an slow SSL handshake. Capture packets with Wireshark and troubleshoot that.
– Luis Muñoz
Nov 8 at 15:09
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
21 BH4CXJ is a new contributor. Be nice, and check out our Code of Conduct.
21 BH4CXJ is a new contributor. Be nice, and check out our Code of Conduct.
21 BH4CXJ is a new contributor. Be nice, and check out our Code of Conduct.
21 BH4CXJ is a new contributor. Be nice, and check out our Code of Conduct.
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
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53203868%2ftomcat-is-very-slow-when-uploading-files-on-localhost-with-https%23new-answer', 'question_page');
}
);
Post as a guest
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
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
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
You may have an slow SSL handshake. Capture packets with Wireshark and troubleshoot that.
– Luis Muñoz
Nov 8 at 15:09