最近在研究node,都说node单线程、事件环机制,高并发效率高,亲测一下,一探究竟

  apache ab 安装

    进入:http://httpd.apache.org/download.cgi#apache24 选择 ApacheHaus 下载。

  使用:解压后,使用cmd进入..\apache\httpd-2.4.27-x64\Apache\bin(加压目录的bin目录下)。

  执行 ab -c 100(并发数) -n 100(发送请求数) localhost:8080/index.html(请求地址)

  node代码:

  var http = require('http');
  http.createServer(function (request, response) {
  response.writeHead(200, {'Content-Type': 'text/plain'});
  response.end('Hello node\n');
  }).listen(8888);
  console.log('Server running at http://127.0.0.1:8888/');
  
  tomcat中项目结构:
  新建一个空的maven项目,里面没有任何内容。
  
  数据分析:
  

结论:当QPS在1000以下时,node相比较与tomcat具有优势,当数据量大于1000时,tomcat开始发力,并且占据优势,当qps达到1w时,tomcat优势巨大。
注:此数据以及测试方式可能并不准确,但可以从侧面说明一些问题。
  

win7下使用apache ab 比较测试node与 tomcat的更多相关文章

  1. apache ab压力测试报错(apr_socket_recv: Connection reset by peer (104))

    apache ab压力测试报错(apr_socket_recv: Connection reset by peer (104))   今天用apache 自带的ab工具测试,当并发量达到1000多的时 ...

  2. apache ab压力测试报错apr_socket_recv

    apache ab压力测试报错(apr_socket_recv: Connection reset by peer (104)) apache 自带的ab工具测试,当并发量达到1000多的时候报错如下 ...

  3. Win7下单机版的伪分布式solrCloud环境搭建Tomcat+solr+zookeeper【转】

    Win7下单机版的伪分布式solrCloud环境搭建Tomcat+solr+zookeeper 1.软件工具箱 在本文的实践中,需要用到以下的软件: Tomcat-7.0.62+solr-5.0.0+ ...

  4. Windows 下配置 ApacheBench (AB) 压力测试

    下载 http://httpd.apache.org/download.cgi 我用的是ApacheHaus. 安装服务 1. 打开apache目录下的 conf/httpd.conf,搜索并修改 L ...

  5. Apache ab压力测试时出现大量的错误原因分析

    最近有一个测试任务,是测试nginx的并发请求到底能够达到多少的, 于是就用ab工具对其进行压力测试. 这压力测试一执行,问题就来了:发起10000次请求,并发100,错误的情况能达到30%--50% ...

  6. Win7下安装Apache+PHP+MySQL

    Win 7 下搭建 WAMP 环境本文安装方法适用于 Windows7 下的 Apache + MySQL + PHP(WAMP)安装,同时也适用于 Windows XP 系统下的安装和配置.一.安装 ...

  7. MAC 安装 apache ab 压力测试工具以及遇到的坑

    ab 是apache对 http服务器进行压力测试的工具,它可以测试出服务器每秒可以处理多少请求.本文记录mac版本安装 ab 的步骤以及遇到的坑. 下载 进入 apache ab官网 下载页面. 安 ...

  8. apache ab压力测试

    今天提到压力测试,想起以前看到的ab,于是又重新查找了下资料,并记录了下. ab命令会创建很多的并发访问线程,模拟多个访问者同时对某一URL地址进行访问. 它的测试目标是基于URL的,因此,既可以用来 ...

  9. [转载] apache ab压力测试报错(apr_socket_recv: Connection reset by peer (104))

    遇见相同的问题. https://www.cnblogs.com/felixzh/p/8295471.html -------------------------------------------- ...

随机推荐

  1. ELK系列~NLog.Targets.Fluentd到达如何通过tcp发到fluentd

    最近火的不能再火的日志框架就是ELK,其中E(Elasticsearch)表示日志存储,L(Logstash)表示日志收集,K(kibana)表示日志的UI界面,用来查询和分析,而其中的L可以使用Fl ...

  2. APP崩溃提示:This application is modifying the autolayout engine from a background thread after the engine was accessed from the main thread. This can lead to engine corruption and weird crashes.

    崩溃输出日志 2017-08-29 14:53:47.332368+0800 HuiDaiKe[2373:1135604] This application is modifying the auto ...

  3. 【转】S3C2440与SDRAM NorFlash NandFlash连线分析

    一.SDRAM(HY57V561620F)连线分析 1.  S3C2440 有27根地址线ADDR[26:0],8根片选信号ngcs0-ngcs7,对应bank0-bank7,当访问bankx 的地址 ...

  4. Tomcat 笔记-配置域名

    编辑/etc/hosts文件,添加域名: 127.0.0.1 localhost 127.0.1.1 ubuntu # The following lines are desirable for IP ...

  5. 【ASP.NET MVC 学习笔记】- 06 在MVC中使用Ninject

    本文参考:http://www.cnblogs.com/willick/p/3299077.html 1.在ASP.NET MVC中一个客户端请求是在特定的Controller的Action中处理的. ...

  6. Java基础总结--IO总结1

    1.IO流(数据流)主要应用概述数据来源:存储在设备里面* IO流用来处理设备间数据之间的传输* Java对数据的操作是通过流的方式* Java用于对流的操作的对象都在IO包* 流按照流向分为:输出流 ...

  7. LeetCode 697. Degree of an Array (数组的度)

    Given a non-empty array of non-negative integers nums, the degree of this array is defined as the ma ...

  8. LeetCode 15. 3Sum(三数之和)

    Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all un ...

  9. 使用Xmanager通过XDMCP连接远程Centos 7 (摘自xmanager官方博客)

    Using Xmanager to connect to remote CentOS 7 via XDMCP Gnome in CentOS 7 tries to use local hardware ...

  10. go 代码的调试---打印调用堆栈

    本文介绍如何打印调用堆栈进行go代码的调试. 打印堆栈使用的runtime package中的Stack()函数 func Stack(buf []byte, all bool) int Stack ...