首页 文章 精选 留言 我的

精选列表

搜索[伪集群],共10000篇文章
优秀的个人博客,低调大师

Vitess 10 发布,MySQL 数据库集群水平扩展系统

Vitess 10 发布了。Vitess 是一个分布式 MySQL 工具集,它可以自动分片存储 MySQL 数据表,将单个 SQL 查询改写为分布式发送到多个 MySQL Server 上,支持行缓存(比 MySQL 本身缓存效率高)与复制容错等。 此版本主要新特性包括: Major Themes 在这个版本中,Vitess 的维护者仍继续专注于兼容性。它仍然是 Vitess 成为 MySQL 生态系统一部分的最关键的组成部分。开发团队也已经开始着手进行基准测试和性能优化。这些改进让其对 Vitess 的哪些方面可以在性能上有所提高有了清晰的认识。 兼容性(MySQL、框架) 随着 V10.0 的发布,Vitess(unsharded) 通过了 Ruby on Rails 框架的所有自动化端到端测试。现在,即使你使用得不是 Rails,这些改进也可能使你受益。接下来,开发团队还计划继续增加对更多框架的测试。 Migration Freno-style throttling 已添加到 VReplication 工作流程中。source 和 target tablets 都可以根据 corresponding shards 的 replication lag 来 throttled。 通过新的安装和迁移命令,你可以从另一个 Vitess cluster 导入数据。 该版本还包括还包括 VReplication V2 用户指令的改进指标、错误修复和微调。 Schema Management Online DDL在第 9 版的基础上继续发展,一些新的和值得注意的内容有: 改进的 SQL语法 通过@@ddl_strategy='online'VReplication 引入基于 VReplication 的迁移是 resharding、materialized views、MoveTables 等背后的基础机制。现在,它可以运行架构迁移 Revertible Online DDL:对已完成的迁移进行无损、online revert Declarative schema更改 性能优化 为 query plans 添加了一个新的、性能更好的缓存实现。新的缓存使用 LFU 驱逐算法,使其对 pollution 有更强的适应性,所以它在 pathological cases 下表现得特别好(比如大量插入活动数据库),同时在正常操作中具有更快的响应时间和更好的命中率。 Vitess SQL Parser 的性能在解析速度和减少内存分配方面都得到了极大的提高。这将减少 vtgate 实例的 CPU 使用率,缩短查询时间,并减少 GC 流失。如果依赖 Vites 解析器的第三方应用程序升级到最新版本,它们也将获得这些好处-外部 API 基本上保持不变。 Vitess 在 SQL 语法树上执行的许多 AST 操作已经过重新设计,因此除非绝对必要,否则它们不会分配内存。这将导致 vtgate 进程的内存使用量明显减少,尤其是在 busy Vitess clusters 中。 大多数改进是在 vtgate 的 CPU 和内存使用方面。开发团队正在努力对延迟和吞吐量的影响进行基准测试,一旦有结果就会公布。 User Interface Vitess 10.0 引入了一个实验性的 multi-cluster admin API 和 Web UI,称为 VTAdmin。部署 vtadmin-api 和 vtadmin-web 组件是完全自愿的。值得注意的是,VTAdmin 依赖于新的 VtctldServer API,所以你必须在你的 vtctlds 上运行新的 grpc-vtctld 服务才能使用它。 Benchmarking 为了确保 Vitess 为用户提供高性能,自 Vitess 9.0 以来,开发团队一直在改进基准测试和性能监控技术。项目arewefastyet是这些技术的核心,目前仍在开发中,其目标是自动测量和观察 Vitess 的性能。 详情可查看:https://vitess.io/blog/2021-04-27-announcing-vitess-10/

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

Linux系统集群架构线上项目配置实战(二)

写在前面 前面介绍了项目的整体情况与初始化服务器环境优化配置方面的内容,由于实际生产需求不一样,优化配置的点也不一样,仅供大家参考! 01配置SSH免密登录 分发服务器使用全网备份服务器 首先创建分发用户 [root@centos ~]# useradd fenfa -u 999 [root@centos ~]# echo "123456"|passwd --stdin fenfa Changing password for user fenfa. passwd: all authentication tokens updated successfully. [root@centos ~]# /bin/cp /etc/sudoers /etc/sudoers.bak [root@centos ~]# echo "fenfa ALL=(root) NOPASSWD:/usr/bin/rsync" >>/etc/sudoers [root@centos ~]# tail -1 /etc/sudoers fenfa ALL=(root) NOPASSWD:/usr/bin/rsync 切换到fenfa用户创建密钥 02配置expect批量分发工具 安装配置expect服务 [root@centos ~]$ yum install expect* -y 编写脚本 执行脚本结果如下 [fenfa@centos ~]$ sh fenfa_key.sh 10.0.0.1 [ OK ] 10.0.0.2 [ OK ] 10.0.0.3 [ OK ] 10.0.0.4 [ OK ] 10.0.0.5 [ OK ] 10.0.0.6 [ OK ] 10.0.0.7 [ OK ] 10.0.0.8 [ OK ] 10.0.0.9 [ OK ] 10.0.0.10[ OK ] 10.0.0.11[ OK ] 10.0.0.12[ OK ] 10.0.0.13 [ OK ] 10.0.0.14[ OK ] 切换到分发用户下查看是否分发成功 [root@centos ~]# su - fenfa [fenfa@centos ~]$ ll /home/fenfa/.ssh/ total 4 -rw------- 1 fenfa fenfa 602 Sep 21 12:14 authorized_keys 根据上面的脚本编写分以hosts文件脚本 脚本执行结果如下 sh fenfa_file.sh host.list /etc/ [fenfa@centos ~]$ ll /etc/host.list -rw-rw-r-- 1 fenfa fenfa 131 Sep 16 12:45 /etc/host.list 只需要将host.list文件替换成你所需要分发的文件就OK了, 03前端反向代理及管理后台服务器的配置 前端nginx反向代理服务器配置 安装所需的依赖包 [root@centos ~]# yum install pcre-devel zlib-devle openssl-devel gcc-c++ –y 编译安装nginx cd /download/tools/ wget http://nginx.org/download/nginx-1.12.1.tar.gz tar zxf nginx-1.12.1.tar.gz cd nginx-1.12.1 ./configure --prefix=/app/nginx-1.12.1 make && make install [root@centos ~]# cd /app/ [root@centos app]# ln -s nginx-1.12.1 nginx [root@centos ~]# cd /app/nginx/conf/ [root@centos conf]# mkdir extra [root@centos conf]# cp nginx.conf nginx.conf.bak 在nginx.conf文件后增加下面的配置 include extra/*.conf; [root@centos ~]# cd /app/nginx/conf/extra/ [root@centos extra]# vim admin.mingongge.conf # # HTTPS server configuration # server { listen 80; server_name admin.mingongge.com; location / { proxy_pass http://10.0.0.6:8080; proxy_connect_timeout 600; proxy_read_timeout 600; proxy_send_timeout 600; } } [root@centos extra]# vim shangjia.mingongge.conf # # HTTPS server configuration # server { listen 80; server_name shangjia.mingongge.com; location / { proxy_pass http://10.0.0.7:8080; proxy_connect_timeout 600; proxy_read_timeout 600; proxy_send_timeout 600; } } 业务平台管理后台admin.mingongge.com JDK Tomcat环境安装 tar zxf apache-tomcat-8.5.9.tar.gz mv apache-tomcat-8.5.9 /usr/local/tomcat tar zxf jdk-8u111-linux-x64.tar.gz -C /usr/local/ cd /usr/local/ ln -s jdk1.8.0_111 jdk cat >>/etc/profile <<EOF export JAVA_HOME=/usr/local/jdk1.8.0_111 export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar export PATH=$JAVA_HOME/bin:$PATH export CATALINA_HOME=/usr/local/apache-tomcat-8.5.9 EOF [root@centos local]# source /etc/profile [root@centos local]# java -version java version "1.8.0_111" Java(TM) SE Runtime Environment (build 1.8.0_111-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode) JDK Tomcat环境配置 <Context path="" docBase="/www/admin" debug="0" reloadable="true" crossContext="true" /> echo "this is the admin.mingongge.com" >/www/admin/index.html /usr/local/tomcat/bin/startup.sh 商家管理后台 shangjia.mingongge.com JDK Tomcat环境安装请参考前面的步骤 <Context path="" docBase="/www/shangjia" debug="0" reloadable="true" crossContext="true" /> echo "this is the shangjia.mingongge.com" >/www/shangjia/index.html /usr/local/tomcat/bin/startup.sh 测试反向代理 [root@centos ~]# curl http://admin.mingongge.com this is the admin.mingongge.com [root@centos ~]# curl http://shangjia.mingongge.com this is the shangjia.mingongge.com 模拟用户访问

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

Linux系统集群架构线上项目配置实战(三)

写在前面 前面介绍了分发文件管理、前端反向代理与管理后台服务器的配置操作,今天介绍下前端负载与APP服务器(用户与商家)、官网、FTP服务器的配置操作 01前端负载均衡配置 安装所需的依赖包 yum install pcre-devel zlib-devle openssl-devel gcc-c++ –y 编译安装nginx cd /download/tools/ wget http://nginx.org/download/nginx-1.12.1.tar.gz tar zxf nginx-1.12.1.tar.gz cd nginx-1.12.1 ./configure --prefix=/app/nginx-1.12.1 make && make install [root@centos ~]# cd /app/ [root@centos app]# ln -s nginx-1.12.1 nginx [root@centos ~]# cd /app/nginx/conf/ [root@centos conf]# mkdir extra [root@centos conf]# cp nginx.conf nginx.conf.bak 在nginx.conf文件后增加下面的配置 include extra/*.conf; [root@centos conf]# cd extra/ oot@centos extra]# vim user.app.conf # # HTTPS server configuration # upstream userapp { server 10.0.0.4:8080; server 10.0.0.4:8081; } server { listen 80; server_name app.mingongge.com; location / { proxy_pass http://userapp; proxy_connect_timeout 600; proxy_read_timeout 600; proxy_send_timeout 600; } [root@centos conf]# cd extra/ [root@centos conf]# vim sj.app.conf # # HTTPS server configuration # upstream sjapp { server 10.0.0.5:8080; server 10.0.0.5:8081; } server { listen 80; server_name sjapp.mingongge.com; location / { proxy_pass http://sjapp; proxy_connect_timeout 600; proxy_read_timeout 600; proxy_send_timeout 600; } } 02后端APP服务器配置 后端APP服务器JAVA环境安装配置 [root@centos tools]# ll total 181168 -rw-r--r-- 1 root root 185515842 Sep 20 15:52 jdk-8u144-linux-x64.tar.gz [root@centos tools]# tar zxf jdk-8u144-linux-x64.tar.gz -C /usr/local/ [root@centos tools]# ln -s /usr/local/jdk1.8.0_144 /usr/local/jdk [root@centos tools]# cat >>/etc/profile<<EOF export JAVA_HOME=/usr/local/jdk export CLASSPATH=.CLASSPATH:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar export PATH=$JAVA_HOME/bin:$PATH EOF [root@centos tools]# tail -3 /etc/profile export JAVA_HOME=/usr/local/jdk export CLASSPATH=.CLASSPATH:/lib/dt.jar:/lib/tools.jar export PATH=$JAVA_HOME/bin:$PATH [root@centos tools]# source /etc/profile [root@centos tools]# java -version java version "1.8.0_144" Java(TM) SE Runtime Environment (build 1.8.0_144-b01) Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode) 后端tomcat 配置 wget http://mirrors.hust.edu.cn/apache/tomcat/tomcat-8/v8.5.20/bin/apache-tomcat-8.5.20.tar.gz [root@centos tools]# tar zxf apache-tomcat-8.5.20.tar.gz -C /usr/local/ [root@centos tools]# ln -s /usr/local/apache-tomcat-8.5.20 /usr/local/tomcat [root@centos tools]# cd /usr/local/apache-tomcat-8.5.20/conf/ [root@centos conf]# vim server.xml -------------此处省略N行-------------- <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log" suffix=".txt" pattern="%h %l %u %t &quot;%r&quot; %s %b" /> <Context path="" docBase="/www/userapp" debug="0" reloadable="true" crossContext="true" /> #增加上述站点目录 [root@centos conf]# mkdir /www/userapp -p echo "this is the frist userapp server" >/www/userapp/index.html [root@centos conf]# ../bin/startup.sh Using CATALINA_BASE: /usr/local/apache-tomcat-8.5.20 Using CATALINA_HOME: /usr/local/apache-tomcat-8.5.20 Using CATALINA_TMPDIR: /usr/local/apache-tomcat-8.5.20/temp Using JRE_HOME:/usr/local/jdk Using CLASSPATH:/usr/local/apache-tomcat-8.5.20/bin/bootstrap.jar:/usr/local/apache-tomcat-8.5.20/bin/tomcat-juli.jar Tomcat started. [root@centos conf]# lsof -i :8080 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME java 1587 root48u IPv618137 0t0TCP *:webcache (LISTEN) 另外一台用户APP 服务器按上述的配置进行 [root@centos conf]# mkdir /www/userapp -p echo "this is the second userapp ">/www/userapp/index.html 商家APP环境配置请参考上面的配置 [root@centos conf]# mkdir /www/sjapp -p echo "this is the frist sjapp ">/www/userapp/index.html echo "this is the second sjapp ">/www/userapp/index.html 接下来测试下负载均衡 前端负载均衡测试 [root@centos conf]# curl http://10.0.0.1 this is the userapp server [root@centos conf]# curl http://10.0.0.1 this is the second userapp [root@centos conf]# curl http://app.mingongge.com this is the userapp server [root@centos conf]# curl http://app.mingongge.com this is the second userapp [root@centos extra]# curl http://sjapp.mingongge.com this is the first sjapp server [root@centos extra]# curl http://sjapp.mingongge.com this is the second sjapp 浏览器访问测试 本地浏览器测试需要配置hosts文件 10.0.0.1 app.mingongge.com 10.0.0.1 sjapp.mingongge.com 03官网与图片服务器配置 基本的架构也是一样使用反向代理,为了后期整体架构扩展 Nginx FTP的安装就不再描述了,太简单了,扯多了累 前面反向代理配置如下 [root@centos extra]# vim web.mingongge.conf # # HTTPS server configuration # server { listen 80; server_name www.mingongge.com; location / { proxy_pass http://10.0.0.8; proxy_connect_timeout 600; proxy_read_timeout 600; proxy_send_timeout 600; } } [root@centos extra]# vim ftp.mingongge.com # # HTTPS server configuration # server { listen 80; server_name ftp.mingongge.com; location / { proxy_pass http://10.0.0.8:88; proxy_connect_timeout 600; proxy_read_timeout 600; proxy_send_timeout 600; } } 后端WEB服务器配置 [root@centos html]# vim index.html welcome to mingongge.s web stie!!!!!!!!!!!!! [root@centos ~]# /usr/local/nginx/sbin/nginx -t nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful [root@centos ~]# /usr/local/nginx/sbin/nginx [root@centos ~]# curl 10.0.0.8 welcome to mingongge.s web stie!!!!!!!!!!!!! FTP这块的配置其实是就是管理后台通过应用程序上传图片,前面用户通过nginx能访问到正确的页面即可,由于线下测试环境,不可能拿生产代码来做实验,因此管理后台上传图片无法模拟,过程就是后台上传图片是通过FTP的功能上传到指定的目录,然后前端通过nginx来调用这个图片去显示 因此就配置下访问图片即可 [root@centos conf]# cd extra/ [root@centos extra]# vim ftp.mingongge.conf server { listen 88; server_name localhost; location / { root /www/ftp; } 上传图片进行测试 通过前端反向代理直接访问域名来读取图,来实现应用程序调用图片的功能在其它前台页面展示的功能 发现也是可以正常访问的 写在最后 此次项目实战的所有文章,凡是每篇都转发三个渠道或以上的朋友(转发后可截图保存等整个项目文档发布结束后发给我),我会在整个项目文档完成之后将文档整理发送给他,并且会抽取其中某篇文章留言点赞前十(需超过20个赞)的朋友,我提供此项目线下测试环境搭建的过程中全程问题解答!!!!!

资源下载

更多资源
腾讯云软件源

腾讯云软件源

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

Nacos

Nacos

Nacos /nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service 的首字母简称,一个易于构建 AI Agent 应用的动态服务发现、配置管理和AI智能体管理平台。Nacos 致力于帮助您发现、配置和管理微服务及AI智能体应用。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据、流量管理。Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。

Spring

Spring

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

Sublime Text

Sublime Text

Sublime Text具有漂亮的用户界面和强大的功能,例如代码缩略图,Python的插件,代码段等。还可自定义键绑定,菜单和工具栏。Sublime Text 的主要功能包括:拼写检查,书签,完整的 Python API , Goto 功能,即时项目切换,多选择,多窗口等等。Sublime Text 是一个跨平台的编辑器,同时支持Windows、Linux、Mac OS X等操作系统。

用户登录
用户注册