首页 文章 精选 留言 我的

精选列表

搜索[中间件],共7496篇文章
优秀的个人博客,低调大师

【阿里云】中间件压力测试PTS

1、PTS是什么PTS是一个即买即用的网站/app压力测试产品,只需要简单的页面设置就能完成业务活动场景、峰值场景的流量模拟,因为发起的流量来自于全国各地,真实度很高,能站在客户端的角度暴露最多的问题。2、PTS的优势•强大的测试流量配比,测试数据构造能力:云端录制、数据工厂、场景可视化编排一站式解决,无需额外脚本•全链路真实还原,加压速度快:最大程度还原真实用户发起流量(稳定、秒级发起、全国CDN、TPS模式、随时调控、超低误差、脉冲),启动、调速、脉冲都是秒级•展现定位能力:客户侧的体验级监控、报表提供能力,服务端快捷的定位能力(配合云监控/ARMS)•原生Jemeter支持:基于jmeter测试的用户特别是不想迁移到pts重新来一遍的客户可以很方便的上传发起压测 不用自己维护构建环境和做控制采集3、PTS的客户价值3.1 压测效率提升30%以上•PTS非常易用,不需要客户安装客户端,开箱即用•强大数据,流量构建能力, 秒级加速速度,使得压测效率提升30%以上•通过客户侧监控报表,快速定位瓶颈,提升定位问题效率。3.2 低成本的容量预估•不同业务模型下容量配比不同,通过PTS基于精准的流量模拟来完成最低成本的容量预估3.3 高效提升用户体验以及对大流量的应对充分性通过PTS压测, 避免由于对大流量的准备不足,导致给企业带来直接经济损失或者品牌形象受损的事情经常发生4、PTS典型案例客户行业:优酷,世界杯直播客户痛点:历史上都没有遇到过通过互联网同时为数亿观众直播一场比赛的场景,直播卡顿,不但浪费16亿的版权费用,还会对优酷品牌造成严重后果使用效果:通过 PTS对直播系统进行了多轮压测,确保系统能保持稳定顺畅 客户行业:本地生活服务客户痛点:作为创业型公司,对于IT建设的成本比较敏感,每次在阿里云购买产品都无法判断投入是不是值得使用效果:在购买PTS对系统进行一轮压测后,发现自己的系统在用户高峰期的时候,SLB的带宽严重不足,但有很多ECS还处于闲置状态。于是他们释放了一部分ECS资源,将节省下来的钱用于加强SLB这一块,再次用PTS进行几轮压测后,找到了一个最佳的资源配比。 客户行业:连锁药店。客户痛点:几个月花了很大的精力开发了一个商品秒杀系统,但担心系统的性能不能满足要求,迟迟不敢上线。使用效果:一个偶然的机会客户从阿里云的合作伙伴那儿了解到有PTS这款产品,便立即进行了购买。经过测试后发现性能的性能可以满足要求,拖了几个月的上线计划在使用PTS后一周就得到了执行。 客户行业:在线直播客户痛点:本身是LoadRunner的用户,以前为了节省成本,冒着法律的风险使用破解版产品,结果最近收到了公司审计部门的警告。使用效果:当他们将压测工具换成PTS后,发现PTS的功能远比LoadRunner强大,使用起来也更简单,而且价格完全可以接受。5、PTS适用行业•手游/页游/直播/短视频:比如点赞、留言、聊天、赠送礼物、广播等 •电商交易类(PC或者APP):浏览、秒杀、购物车、下单 •互联网APP(社交、互金、出行、生活、知识付费、传统行业、区块链):拉新、推广、自身核心业务场景 •网站类(几乎所有行业):首页、注册、登陆、内部系统、核心业务等;如教育、体育行业的在线报名、查询结果 •各平台上的应用:比如支付宝、微信、钉钉等开放平台上的第三方业务和页面6、PTS计费及主推规格PTS的计费单位是VUM。公式为:VUM=VU(压测任务中并发用户数)*M(压测场景执行时长,按分钟粒度,不满一分钟按一分钟计算)举例:4并发用户运行2分钟即8VUM, 8并发用户运行1分钟也是8VUM。PTS 铂金版采用预付费购买资源包的形式收费。VUM额度类似上网的流量套餐包,5G,10G等等,表示一共是多少量。最大并发用户数类似流量包里的带宽,100M光宽带还是1M,决定压测时最高并发用户数的上限,是一个重要指标。下面的价格表仅供参考,有可能会调整,具体价格请查看官网的产品价格页。

优秀的个人博客,低调大师

mysql分布式中间件cobar

Cobar的分布式主要是通过将表放入不同的库来实现: 1.Cobar支持将一张表水平拆分成多份分别放入不同的库来实现表的水平拆分 2.Cobar也支持将不同的表放入不同的库 3.多数情况下,用户会将以上两种方式混合使用 4.Cobar不支持将一张表,例如test表拆分成test_1, test_2, test_3.....放在同一个库中,必须将拆分后的表分别放入不同的库来实现分布式 缺点: 1.不支持跨库的关联操作:join、分页、排序、子查询 2.不支持SAVEPOINT操作 3.不支持SET语句的执行,事务和字符集设置语句除外 4.只支持MySQL数据节点 5.对于拆分表,插入操作须给出列名,必须包含拆分字段 环境规划: IP 数据库 表 192.168.1.247 test01 t1 192.168.1.247 test02 t1 192.168.1.247 test03 t1 说明:在本服务器创建三个数据库,数据库中创建相同的表和表类型,将t1表中的数据拆分到teat01,02,03数据库中. 1.创建数据库和表 [root@tong1 ~]# /usr/local/mysql-5.6.23/bin/mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 6028 Server version: 5.6.23-log MySQL Community Server (GPL) Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> create database test01; --创建数据库test01,02,03 Query OK, 1 row affected (0.03 sec) mysql> create database test02; Query OK, 1 row affected (0.03 sec) mysql> create database test03; Query OK, 1 row affected (0.03 sec) mysql> \u test01 Database changed mysql> create table t1(a int,b char(5));--在三个数据库创建相同的表 Query OK, 0 rows affected (0.34 sec) mysql> \u test02 Database changed mysql> create table t1(a int,b char(5)); Query OK, 0 rows affected (0.31 sec) mysql> \u test03 Database changed mysql> create table t1(a int,b char(5)); Query OK, 0 rows affected (0.30 sec) mysql> show tables; +------------------+ | Tables_in_test03 | +------------------+ | t1 | +------------------+ 1 row in set (0.00 sec) mysql> grant all privileges on *.* to tong@'localhost'identified by 'system'; Query OK, 0 rows affected (0.05 sec) mysql> flush privileges; Query OK, 0 rows affected (0.06 sec) mysql> exit Bye [root@tong1 bin]# 2.安装java开发软件包 [root@tong1 ~]# tar xvf jdk-7u71-linux-x64.tar.gz -C /usr/local/ [root@tong1 ~]# cd /usr/local/ [root@tong1 local]# chown -R root:root jdk1.7.0_71/ [root@tong1 local]# vim /etc/profile --添加环境变量 export PATH=$PATH:/usr/local/protobuf-2.5.0/bin:/usr/local/jdk1.7.0_71/bin export JAVA_HOME=/usr/local/jdk1.7.0_71/ export CLASS_HOME=/usr/local/jdk1.7.0_71/lib [root@tong1 local]# . /etc/profile [root@tong1 local]# java -version --查看java是否安装成功 java version "1.7.0_71" Java(TM) SE Runtime Environment (build 1.7.0_71-b14) Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode) [root@tong1 local]# 3.下载安装cobar 下载地址:http://pan.baidu.com/s/1o6igLwY [root@tong1 ~]# tar xvf cobar-server-1.2.7.tar.gz -C /usr/local/ [root@tong1 ~]# cd /usr/local/cobar-server-1.2.7/ [root@tong1 cobar-server-1.2.7]# ll total 36 drwxr-xr-x. 2 root root 4096 Dec 29 2012 bin drwxr-xr-x. 2 root root 4096 Dec 29 2012 conf -rwsrwsrwt. 1 root root 575 Dec 29 2012 COPYRIGHT drwxr-xr-x. 3 root root 4096 May 14 10:13 lib -rwsrwsrwt. 1 root root 11549 Dec 29 2012 LICENSE drwxr-xr-x. 2 root root 4096 Dec 29 2012 logs -rwsrwsrwt. 1 root root 428 Dec 29 2012 README [root@tong1 cobar-server-1.2.7]# cd conf/ [root@tong1 conf]# ll total 16 -rw-r--r--. 1 root root 2604 Dec 29 2012 log4j.xml -rw-r--r--. 1 root root 1262 Dec 29 2012 rule.xml -rw-r--r--. 1 root root 1966 Dec 29 2012 schema.xml --mysql数据库的IP,端口 -rw-r--r--. 1 root root 2292 Dec 29 2012 server.xml [root@tong1 conf]# vim schema.xml <!-- schema定义 --> <schema name="test" dataNode="test1"> --test架构名,用于用户登陆,test1第一个数据库 <table name="t1" dataNode="test2,test3" rule="rule1" /> --t1是表名,拆分的表,test2,test3是两个数据库名 </schema> <!-- 数据节点定义,数据节点由数据源和其他一些参数组织而成。--> <dataNode name="test1"> --test1是第一个数据库 <property name="dataSource"> <dataSourceRef>test[0]</dataSourceRef> --第一个数据库源 </property> </dataNode> <dataNode name="test2"> --第二个数据库 <property name="dataSource"> <dataSourceRef>test[1]</dataSourceRef> </property> </dataNode> <dataNode name="test3"> --第三个数据库 <property name="dataSource"> <dataSourceRef>test[2]</dataSourceRef> </property> </dataNode> <!-- 数据源定义,数据源是一个具体的后端数据连接的表示。--> <dataSource name="test"type="mysql"> --test源数据,用于用户登陆 <property name="location"> <location>192.168.1.247:3306/test1</location> --三个数据库服务器和数据库名,数据库也可在不同的服务器上 <location>192.168.1.247:3306/test2</location> <location>192.168.1.247:3306/test3</location> </property> <property name="user">tong</property> --用户登陆 <property name="password">system</property> --密码 <property name="sqlMode">STRICT_TRANS_TABLES</property> </dataSource> [root@tong1 conf]# vim rule.xml <!-- 路由规则定义,定义什么表,什么字段,采用什么路由算法 --> <tableRule name="rule1"> <rule> <columns>id</columns> <algorithm><![CDATA[ func1(${id}) ]]></algorithm> </rule> </tableRule> <!-- 路由函数定义 --> <function name="func1" class="com.alibaba.cobar.route.function.PartitionByLong"> <property name="partitionCount">2</property> <property name="partitionLength">512</property> [root@tong1 conf]# vim server.xml <!-- 系统参数定义,服务端口、管理端口,处理器个数、线程池等。 --> <system> <property name="serverPort">8066</property> --cobar服务启动端口 <property name="managerPort">9066</property> --管理端口 <property name="initExecutor">16</property> <property name="timerExecutor">4</property> <property name="managerExecutor">4</property> <property name="processors">4</property> <property name="processorHandler">8</property> <property name="processorExecutor">8</property> <property name="clusterHeartbeatUser">_HEARTBEAT_USER_</property> <property name="clusterHeartbeatPass">_HEARTBEAT_PASS_</property> </system> <!-- 用户访问定义,用户名、密码、schema等信息。 --> <user name="tong"> --登陆用户名 <property name="password">system</property> --密码 <property name="schemas">test</property> --架构名,用户连接的数据库 </user> [root@tong1 bin]# ./startup.sh --启动服务 "/usr/local/jdk1.7.0_71/bin/java" -Dcobar.home="/usr/local/cobar-server-1.2.7" -classpath "/usr/local/cobar-server-1.2.7/conf:/usr/local/cobar-server-1.2.7/lib/classes:/usr/local/cobar-server-1.2.7/lib/cobar-server-1.2.7.jar:/usr/local/cobar-server-1.2.7/lib/log4j-1.2.16.jar" -server -Xms1024m -Xmx1024m -Xmn256m -Xss256k -XX:+AggressiveOpts -XX:+UseBiasedLocking -XX:+UseFastAccessorMethods -XX:+DisableExplicitGC -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:+UseCMSCompactAtFullCollection -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=75 com.alibaba.cobar.CobarStartup >> "/usr/local/cobar-server-1.2.7/logs/console.log" 2>&1 & [root@tong1 bin]# cat ../logs/stdout.log --查看日志 15:33:02,933 INFO =============================================== 15:33:02,934 INFO Cobar is ready to startup ... 15:33:02,934 INFO Startup processors ... 15:33:03,026 INFO Startup connector ... 15:33:03,031 INFO Initialize dataNodes ... 15:33:03,051 INFO test2:0 init success 15:33:03,053 INFO test1:0 init success 15:33:03,055 INFO test3:0 init success 15:33:03,066 INFO CobarManager is started and listening on 9066 15:33:03,068 INFO CobarServer is started and listening on 8066 15:33:03,071 INFO =============================================== [root@tong1 bin]# cat ../logs/console.log log4j:WARN 2015-05-14 15:33:02 [/usr/local/cobar-server-1.2.7/conf/log4j.xml] load completed.[root@tong1 bin]# netstat -antup | grep java tcp 0 0 :::8066 :::* LISTEN 25359/java tcp 0 0 :::9066 :::* LISTEN 25359/java tcp 0 0 ::ffff:192.168.1.247:52451 ::ffff:192.168.1.247:3306 ESTABLISHED 25359/java tcp 0 0 ::ffff:192.168.1.247:52450 ::ffff:192.168.1.247:3306 ESTABLISHED 25359/java tcp 0 0 ::ffff:192.168.1.247:52452 ::ffff:192.168.1.247:3306 ESTABLISHED 25359/java [root@tong1 bin]# 4.登陆数据库插入数据(以下红色部分不能少) [root@tong1 data]# /usr/local/mysql-5.6.23/bin/mysql -h192.168.1.247-utong -p -P8066-Dtest Enter password: Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.1.48-cobar-1.2.7 Cobar Server (ALIBABA) Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show databases; --客户端连接的数据库名 +----------+ | DATABASE | +----------+ | test | +----------+ 1 row in set (0.00 sec) mysql> \u test Database changed mysql> show tables; --表名 +----------------+ | Tables_in_test | +----------------+ | t1 | +----------------+ 2 rows in set (0.00 sec) mysql> insert into t1 values(1,'c'); --插入数据 Query OK, 2 rows affected (0.14 sec) mysql> insert into t1 values(2,'z'); Query OK, 2 rows affected (0.20 sec) mysql> select * from t1; --不知道为什么test1数据库中有重复的数据 +------+------+ | a | b | +------+------+ | 1 | c | | 2 | z | | 1 | c | | 2 | z | +------+------+ 4 rows in set (0.01 sec) mysql> 5.在另外两个数据库中查看数据 [root@tong1 bin]# /usr/local/mysql-5.6.23/bin/mysql -u root -p -D test2 --在test2查看数据 Enter password: Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 6124 Server version: 5.6.23-log MySQL Community Server (GPL) Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> select * from t1; --有数据 +------+------+ | a | b | +------+------+ | 1 | c | | 2 | z | +------+------+ 3 rows in set (0.00 sec) mysql> select * from test3.t1; --在test3数据库查看数据 +------+------+ | a | b | +------+------+ | 1 | c | | 2 | z | +------+------+ 3 rows in set (0.00 sec) mysql> 本文转自 z597011036 51CTO博客,原文链接:http://blog.51cto.com/tongcheng/1651162,如需转载请自行联系原作者

优秀的个人博客,低调大师

FolkMQ(消息中间件) v1.4.2 发布

功能简表 角色 功能 生产者(客户端) 发布消息、定时消息(或叫延时)、顺序消息、可过期消息、事务消息。支持 Qos0、Qos1 消费者(客户端) 订阅、取消订阅。消费-ACK(自动、手动) 服务端 发布-Confirm、订阅-Confirm、取消订阅-Confirm、派发-Retry、派发-Delayed 本次更新 添加 自定义 tid(key) 支持(之前自动生成) 添加 PackagingLoopImpl 新的构造函数 添加 外部配置文件加载支持(./data/app.yml) 添加 消息二进制数据支持(可以方便不同的消息数据序列化) 添加 顺序消息分区支持(在集群下才有效) 优化 顺序消息没有消费者时 server 端 cpu 过高的问题 优化 企业版授权控制 优化 Server 预关闭支持 优化 顺序消息的强制派发处理 sokcet.d 升为 2.4.10 面向简单编程 1) 启动服务 docker run -p 18602:18602 -p 8602:8602 noearorg/folkmq-server:1.4.2 2) 编写程序 引入一个小依赖 <dependency> <groupId>org.noear</groupId> <artifactId>folkmq-transport-netty</artifactId> <version>1.4.2</version> </dependency> 写程序喽 public class ClientDemo { public static void main(String[] args) throws Exception { //创建客户端,并连接 MqClient client = FolkMQ.createClient("folkmq://127.0.0.1:18602") .nameAs("demoapp") .connect(); //订阅主题 client.subscribe("demo.topic", message -> { System.out.println(message); }); //发布消息 client.publish("demo.topic", new MqMessage("helloworld!")); } } 代码仓库 https://gitee.com/noear/folkmq https://github.com/noear/folkmq 官网 https://folkmq.noear.org

资源下载

更多资源
Mario

Mario

马里奥是站在游戏界顶峰的超人气多面角色。马里奥靠吃蘑菇成长,特征是大鼻子、头戴帽子、身穿背带裤,还留着胡子。与他的双胞胎兄弟路易基一起,长年担任任天堂的招牌角色。

腾讯云软件源

腾讯云软件源

为解决软件依赖安装时官方源访问速度慢的问题,腾讯云为一些软件搭建了缓存服务。您可以通过使用腾讯云软件源站来提升依赖包的安装速度。为了方便用户自由搭建服务架构,目前腾讯云软件源站支持公网访问和内网访问。

Spring

Spring

Spring框架(Spring Framework)是由Rod Johnson于2002年提出的开源Java企业级应用框架,旨在通过使用JavaBean替代传统EJB实现方式降低企业级编程开发的复杂性。该框架基于简单性、可测试性和松耦合性设计理念,提供核心容器、应用上下文、数据访问集成等模块,支持整合Hibernate、Struts等第三方框架,其适用范围不仅限于服务器端开发,绝大多数Java应用均可从中受益。

Rocky Linux

Rocky Linux

Rocky Linux(中文名:洛基)是由Gregory Kurtzer于2020年12月发起的企业级Linux发行版,作为CentOS稳定版停止维护后与RHEL(Red Hat Enterprise Linux)完全兼容的开源替代方案,由社区拥有并管理,支持x86_64、aarch64等架构。其通过重新编译RHEL源代码提供长期稳定性,采用模块化包装和SELinux安全架构,默认包含GNOME桌面环境及XFS文件系统,支持十年生命周期更新。

用户登录
用户注册