前端技术
HTML
CSS
Javascript
前端框架和UI库
VUE
ReactJS
AngularJS
JQuery
NodeJS
JSON
Element-UI
Bootstrap
Material UI
服务端和客户端
Java
Python
PHP
Golang
Scala
Kotlin
Groovy
Ruby
Lua
.net
c#
c++
后端WEB和工程框架
SpringBoot
SpringCloud
Struts2
MyBatis
Hibernate
Tornado
Beego
Go-Spring
Go Gin
Go Iris
Dubbo
HessianRPC
Maven
Gradle
数据库
MySQL
Oracle
Mongo
中间件与web容器
Redis
MemCache
Etcd
Cassandra
Kafka
RabbitMQ
RocketMQ
ActiveMQ
Nacos
Consul
Tomcat
Nginx
Netty
大数据技术
Hive
Impala
ClickHouse
DorisDB
Greenplum
PostgreSQL
HBase
Kylin
Hadoop
Apache Pig
ZooKeeper
SeaTunnel
Sqoop
Datax
Flink
Spark
Mahout
数据搜索与日志
ElasticSearch
Apache Lucene
Apache Solr
Kibana
Logstash
数据可视化与OLAP
Apache Atlas
Superset
Saiku
Tesseract
系统与容器
Linux
Shell
Docker
Kubernetes
[备用服务器]的搜索结果
这里是文章列表。热门标签的颜色随机变换,标签颜色没有特殊含义。
点击某个标签可搜索标签相关的文章。
点击某个标签可搜索标签相关的文章。
HTML
...设置图片显示异常时的备用文字。 问题 有时候你会遇到这样一个情况:插入好的图片在网页中显示异常出来,或者展现的图片大小与原图不符,无法按照你的预期尺寸进行展示。造成这个问题的缘由有很多种,比如图片地址的失误、路径的失误、缺失文件等等。 解决 通常来说解决这个问题需要详细审查你的代码,验证你的标记是否配置准确。如果你想要显示的是本地图像文件上的图片,你需要验证路径是否配置准确。如果你想要显示的是网络链接上的图片,你需要验证地址是否正确并且是否可访问。 另外,如果你想要设置图片的大小,可以在标记中插入width和height属性来分别定义宽和高。不过需要注意的是,这些属性只是建议性的,浏览器可以根据自身的显示尺寸对图片进行缩放,因此你无法完全控制图片的显示尺寸。 下面是一些代码的示例,用于说明如何在HTML中插入图片: <img src="https://example.com/image.jpg" alt="这是一张图片"> 这个代码段用于在页面中插入一张来自网络链接的图片,如果无法正常加载,就会显示alt属性中的文本。 <img src="picture.jpg" alt="这是一张本地图片"> 这个代码段用于在页面中插入一张来自本地图像文件上的图片,需要验证路径是否正确。 <img src="picture.jpg" alt="这是一张本地图片" width="300" height="200"> 这个代码段用于在页面中插入一张来自本地图像文件上的图片,并且设置了固定的宽和高来控制图片的尺寸。 结论 在HTML中插入图片需要详细审查代码,验证图片的地址、路径以及文件是否存在等等。如果你想要控制图片的显示尺寸,可以在标记中插入width和height属性,但需要注意浏览器可能会根据自身的特性对图片进行缩放,因此无法完全控制其尺寸。
2023-10-13 11:52:48
468
逻辑鬼才
PostgreSQL
... 的结果想象成一个备用值,当 JOIN 找不到匹配项时就用这个备用值。这样可以避免数据重复,同时也能达到合并的效果。 sql SELECT e.name AS employee_name, COALESCE(d.name, 'Unknown') AS department_name FROM employees e LEFT JOIN departments d ON e.department_id = d.id; 这里使用了 COALESCE 函数,当 d.name 为空时(即没有匹配到部门),返回 'Unknown'。这样就能保证所有的员工都有部门信息,即使该部门不存在。 3.3 使用 CASE WHEN 如果我们想在某些情况下返回不同的结果,可以考虑使用 CASE WHEN 语句。例如,如果某个员工的部门不存在,我们可以显示特定的提示信息: sql SELECT e.name AS employee_name, CASE WHEN d.id IS NULL THEN 'No Department' ELSE d.name END AS department_name FROM employees e LEFT JOIN departments d ON e.department_id = d.id; 这样,当 d.id 为 NULL 时,我们就可以知道该员工没有对应的部门信息,并显示相应的提示。 4. 总结与反思 通过上述几种方法,我们可以看到,合并SQL语句其实有很多方式。每种方式都有其适用场景和优缺点。在实际应用中,我们应该根据具体需求选择最合适的方法。这些招数不光让代码更好懂、跑得更快,还把我们的SQL技能磨得更锋利了呢! 在学习过程中,我发现,SQL不仅仅是机械地编写代码,更是一种逻辑思维的体现。每一次优化和改进都是一次对问题本质的深刻理解。希望这篇文章能帮助你更好地理解和掌握SQL语句的合并技巧,让你在数据库操作中更加游刃有余。
2025-03-06 16:20:34
54
林中小径_
HTML
...因为网络挤成一锅粥、服务器累趴下,或者数据得跑好远的路,这些情况都可能导致你的数据包迷路或者迟到。 思考过程: 想象一下,你正在使用Skype进行一场重要的商务会议,但突然间,画面开始卡顿,声音断断续续。这时候你会怎么办?是直接挂断电话还是寻找解决办法? 2. 使用备用服务器和多路复用 为了应对网络不稳定的情况,我们可以考虑使用备用服务器和多路复用技术。给系统加上几个备用服务器,这样如果主服务器挂了,就能自动切换到备用的,确保服务不停摆,一切照常运作。 代码示例: html 3. 实施带宽自适应策略 另一个有效的解决方案是实施带宽自适应策略。通过动态调整视频质量和码率,可以根据当前网络状况优化用户体验。例如,当检测到网络带宽较低时,降低视频分辨率或帧率,以减少数据传输量。 代码示例: javascript const videoElement = document.querySelector('video'); let currentQualityLevel = 720; function adjustQuality() { if (isNetworkStable()) { videoElement.width = 1920; videoElement.height = 1080; currentQualityLevel = 1080; } else { videoElement.width = 720; videoElement.height = 480; currentQualityLevel = 480; } } window.addEventListener('resize', adjustQuality); 4. 使用回音消除和降噪技术 最后,为了提高音频质量,我们可以使用回音消除和降噪技术。这些技术能够有效减少背景噪音和回声,提升用户的通话体验。特别是在嘈杂的环境中,这些技术的作用尤为明显。 代码示例: javascript const audioContext = new AudioContext(); const noiseSuppression = audioContext.createNoiseSuppressor(); navigator.mediaDevices.getUserMedia({ audio: true }) .then(stream => { const source = audioContext.createMediaStreamSource(stream); source.connect(noiseSuppression); noiseSuppression.connect(audioContext.destination); }); 结论 处理WebRTC连接中的网络不稳定情况是一项复杂而重要的任务。通过上述方法,我们可以大大提升用户体验,确保通信的流畅性和可靠性。在这过程中,咱们不仅要搞定技术上的难题,还得紧盯着用户的心声和反馈,不断地调整和改进我们的方案,让大伙儿用得更舒心。希望本文能对你有所帮助,让我们一起努力,为用户提供更好的实时通信体验!
2025-01-10 16:06:48
159
冬日暖阳_
Etcd
...etes 中,以提供服务发现和配置管理功能。不过呢,虽然 Etcd 这家伙性能强大、稳定性杠杠的,但偶尔也会受点外部因素的窝囊气,比如突如其来的电源故障啥的,就可能让它闹点小情绪。本文将深入探讨这种问题,并提供有效的解决方案。 二、Etcd 数据库结构 Etcd 的数据库是一个基于 gRPC 的分布式 key-value 存储系统。它就像一个大家庭,由一群实力相当的兄弟服务器组成,每台服务器都各自保管着一部分数据,而且个个都能独立完成读取和写入这些数据的任务,谁也不用依赖谁。如果有一个节点突然罢工了,其他节点就会立马顶上,接手它的工作任务,这样就能确保整个系统的稳定运行和数据的一致性,就像一个团队中有人请假了,其他人会立刻补位,保证工作顺利进行一样。 三、电源故障对 Etcd 数据库的影响 1. 数据丢失 电源故障可能会导致数据无法保存到磁盘上,从而使 Etcd 丢失部分或全部数据。 2. 系统不稳定 当多个节点同时出现电源故障时,可能会导致整个 Etcd 系统变得不稳定,甚至无法正常运行。 四、解决方法 1. 数据备份 定期对 Etcd 数据进行备份可以帮助我们在遇到电源故障时快速恢复数据。我们可以使用 etcdctl 工具来创建和导出数据备份。 示例代码: 创建备份文件 etcdctl backup save mybackup.etcd 导出备份文件 etcdctl backup export mybackup.etcd 2. 使用高可用架构 我们可以通过设置冗余节点和负载均衡器来提高 Etcd 系统的高可用性。当一个节点出现故障时,其他节点可以接替其工作,从而避免服务中断。 3. 增加电源冗余 为了防止电源故障,我们可以增加电源冗余,例如使用 UPS 或备用发电机。 五、结论 虽然电源故障可能会对 Etcd 数据库造成严重影响,但我们可以通过数据备份、使用高可用架构和增加电源冗余等方式来降低这种风险。如果我们采取适当的预防措施,就能妥妥地保护那些至关重要的数据,并且让Etcd系统始终保持稳稳当当的工作状态,就像一台永不停歇的精密时钟一样稳定可靠。 最后,我们要记住的是,无论我们使用何种技术,都无法完全消除所有可能的风险。所以呢,咱们得随时绷紧这根弦儿,时不时给咱们的系统做个全身检查和保养,好让它们随时都能活力满满、状态最佳地运转起来。
2023-05-20 11:27:36
520
追梦人-t
ClickHouse
...式环境下提供高可用的服务。 3. 易用性 ClickHouse提供了直观易用的SQL接口,使得数据分析变得更加简单和便捷。 三、使用ClickHouse实现高可用性架构 1. 什么是高可用性架构? 所谓高可用性架构,就是指一个系统能够在出现故障的情况下,仍能继续提供服务,保证业务的连续性和稳定性。在实际应用中,我们通常会采用冗余、负载均衡等手段来构建高可用性架构。 2. 如何使用ClickHouse实现高可用性架构? (1) 冗余部署 我们可以将多个ClickHouse服务器进行冗余部署,当某个服务器出现故障时,其他服务器可以接管其工作,保证服务的持续性。比如说,我们可以动手搭建一个ClickHouse集群,这个集群里头有三个节点。具体咋安排呢?两个节点咱们让它担任主力,也就是主节点的角色;剩下一个节点呢,就作为备胎,也就是备用节点,随时待命准备接替工作。 (2) 负载均衡 通过负载均衡器,我们可以将用户的请求均匀地分发到各个ClickHouse服务器上,避免某一台服务器因为承受过大的压力而出现性能下降或者故障的情况。比如,我们可以让Nginx大显身手,充当一个超级智能的负载均衡器。想象一下,当请求像潮水般涌来时,Nginx这家伙能够灵活运用各种策略,比如轮询啊、最少连接数这类玩法,把请求均匀地分配到各个服务器上,保证每个服务器都能忙而不乱地处理任务。 (3) 数据备份和恢复 为了防止因数据丢失而导致的问题,我们需要定期对ClickHouse的数据进行备份,并在需要时进行恢复。例如,我们可以使用ClickHouse的内置工具进行数据备份,然后在服务器出现故障时,从备份文件中恢复数据。 四、代码示例 下面是一个简单的ClickHouse查询示例: sql SELECT event_date, SUM(event_count) as total_event_count FROM events GROUP BY event_date; 这个查询语句会统计每天的事件总数,并按照日期进行分组。虽然ClickHouse在查询速度上确实是个狠角色,但当我们要对付海量数据的时候,还是得悠着点儿,注意优化查询策略。就拿那些不必要的JOIN操作来说吧,能省则省;还有索引的使用,也得用得恰到好处,才能让这个高性能的家伙更好地发挥出它的实力来。 五、总结 ClickHouse是一款功能强大的高性能数据库系统,它为我们提供了构建高可用性架构的可能性。不过呢,实际操作时咱们也要留心,挑对数据库系统只是第一步,更关键的是,得琢磨出一套科学合理的架构设计方案,还得写出那些快如闪电的查询语句。只有这样,才能确保系统的稳定性与高效性,真正做到随叫随到、性能杠杠滴。
2023-06-13 12:31:28
557
落叶归根-t
ActiveMQ
...尽人意,未能迅速恢复服务,进一步加剧了用户的不满情绪。 针对这一事件,行业专家提出了几点改进建议。首先,应加强对消息队列的监控和预警机制建设,确保在问题发生前能够及时发现并采取措施。其次,企业应该考虑采用更加成熟的商业消息队列产品,如Apache Kafka或Amazon SQS,这些产品在高并发场景下的表现更为稳定可靠。最后,建立完善的容灾备份机制也是必不可少的,确保在主系统出现故障时,备用系统能够快速接管,减少业务中断时间。 这次事件不仅提醒了各大企业在选择和使用消息队列技术时需更加谨慎,同时也促进了整个行业的反思与进步。未来,随着技术的不断发展和完善,相信类似的问题将得到有效解决,为企业提供更加稳定高效的服务保障。
2025-02-06 16:32:52
22
青春印记
SpringCloud
微服务架构 , 微服务架构是一种软件开发模式,它将大型复杂的应用程序拆分成一组小型、独立的服务。每个服务运行在其自身的进程中,服务于特定的业务功能,并通过API接口进行通信和协作。在本文中,微服务架构被广泛采用,SpringCloud作为实现微服务间通信与协调的关键工具。 服务熔断(Hystrix) , 服务熔断是微服务架构中的一项容错策略,由Netflix开源工具Hystrix提供。在高并发或网络不稳定情况下,当某个依赖服务出现故障时,服务熔断机制会暂时阻止对该服务的所有调用请求,以防止级联故障和服务雪崩现象的发生。在文章中,Hystrix被用于SpringCloud框架中,通过设置阈值触发熔断,并提供了服务降级功能,即当主服务不可用时返回备用逻辑。 服务注册与发现(Eureka) , Eureka是SpringCloud生态中的一个组件,主要用于实现服务的注册与发现。在微服务体系中,各个服务实例启动后会在Eureka服务器上进行注册,形成服务注册表。同时,其他服务实例可以通过查询Eureka获取到这些已注册的服务实例列表并进行动态路由选择,确保即使在网络故障导致部分服务实例下线时,客户端仍能快速感知并切换至健康的服务实例,从而维持微服务间的连通性和系统的整体稳定性。
2023-05-11 19:41:57
112
柳暗花明又一村
Spark
...个压根儿就不在DNS服务器上的主机名或者IP地址时,系统就会抛出这个异常,告诉你这次解析尝试失败了。简单来说,就是我们的应用程序试图访问一个不存在的服务器。 三、UnknownHostException在Spark中的常见表现 在Spark应用中,UnknownHostException通常会在以下几种情况下出现: 1. 尝试连接到外部数据源时 例如,Hive、Kafka等。 2. 在使用Spark SQL进行操作时,需要从外部系统读取数据。 3. 使用Spark Streaming进行实时流处理时,可能会因为无法建立与上游系统的连接而抛出此异常。 四、解决UnknownHostException的方法 那么,我们该如何优雅地处理UnknownHostException呢?以下是几种常用的方法: 方法一:增加重试次数 当遇到UnknownHostException时,我们可以选择增加重试次数。这样,如果服务器只是暂时不可用,那么程序仍有可能成功运行。下面是使用Scala编写的一个示例: scala val conf = new SparkConf().setAppName("MyApp") val sc = new SparkContext(conf) val maxRetries = 5 var retryCount = 0 while (retryCount < maxRetries) { try { // 这里是你的代码... ... break } catch { case e: UnknownHostException => if (retryCount == maxRetries - 1) { throw e } println(s"Received UnknownHostException, retrying in ${maxRetries - retryCount} seconds...") Thread.sleep(maxRetries - retryCount 1000) retryCount += 1 } } 在这个示例中,我们设置了最大重试次数为5次。每次重试之间会等待一段时间,避免过度消耗资源。 方法二:使用备用数据源 如果主数据源经常出现问题,我们可以考虑使用备用数据源。这可以保证即使主数据源不可用,我们的程序仍然能够正常运行。以下是一个简单的示例: scala val conf = new SparkConf().setAppName("MyApp") val sc = new SparkContext(conf) val master = "spark://:7077" val spark = SparkSession.builder() .appName("MyApp") .master(master) .getOrCreate() // 查询数据 val data = spark.sql("SELECT FROM my_table") // 处理数据 data.show() 在这个示例中,我们设置了两个Spark配置项:spark.master和spark.sql.warehouse.dir。这两个选项分别指定了Spark集群的Master节点和数据仓库目录。这样子做的话,我们就能保证,就算某个地方的数据出了岔子,我们的程序依旧能稳稳当当地运行下去,一点儿不受影响。 方法三:检查网络连接 最后,我们还可以尝试检查网络连接是否存在问题。比如,咱们可以试试给那个疑似出问题的服务器丢个ping包瞧瞧,看看它是不是还健在,能给出正常回应不。要是搞不定的话,可能就得瞅瞅咱们的网络配置是否出了啥问题,或者直接找IT部门的大神们求救了。 五、总结 总的来说,处理UnknownHostException的关键在于找到问题的原因并采取适当的措施。不管是多试几次,还是找个备胎数据源来顶上,都能实实在在地让咱们的程序更加稳如磐石。在使用Spark开发应用的时候,我们还能充分挖掘Spark的硬核实力,比如灵活运用SQL查询功能,实时处理数据流等招数,这都能让咱们的应用性能嗖嗖提升,更上一层楼。希望通过这篇文章,你能学到一些实用的技巧,并在未来的开发工作中游刃有余。
2024-01-09 16:02:17
136
星辰大海-t
RabbitMQ
...出门忘了带钥匙,但有备用钥匙在手,就能轻松解决问题一样,这个机制就是系统的那个备用钥匙,关键时刻能救大急! 第二部分:消息重新入队的关键因素 - 消息持久化:消息是否持久化决定了消息在RabbitMQ服务器重启后是否能继续存在。启用持久化(basic.publish()方法中的mandatory参数设置为true)是实现消息重新入队的基础。 - 确认机制:通过配置confirm.select,可以确保消息被正确地投递到队列中。这有助于检测消息投递失败的情况,从而触发重新入队流程。 - 死信交换:当消息经过一系列处理后仍不符合接收条件时,可能会被转移到死信队列中。合理配置死信策略,可以避免死信积累,确保消息正常流转。 第三部分:实现消息重新入队的步骤 步骤一:配置持久化 在RabbitMQ中,确保消息持久化是实现重新入队的第一步。通过生产者代码添加持久化标志: python import pika connection = pika.BlockingConnection(pika.ConnectionParameters('localhost')) channel = connection.channel() channel.queue_declare(queue='my_queue', durable=True) message = "Hello, RabbitMQ!" channel.basic_publish(exchange='', routing_key='my_queue', body=message, properties=pika.BasicProperties(delivery_mode=2)) 设置消息持久化 connection.close() 步骤二:使用确认机制 通过confirm.select来监听消息确认状态,确保消息成功到达队列: python def on_delivery_confirmation(method_frame): if method_frame.method.delivery_tag in sent_messages: print(f"Message {method_frame.method.delivery_tag} was successfully delivered") else: print("Failed to deliver message") sent_messages = [] connection = pika.BlockingConnection(pika.ConnectionParameters('localhost')) channel = connection.channel() channel.confirm_delivery() channel.basic_consume(queue='my_queue', on_message_callback=callback, auto_ack=False) channel.start_consuming() 步骤三:处理异常与重新入队 在消费端,通过捕获异常并重新发送消息到队列来实现重新入队: python import pika def callback(ch, method, properties, body): try: process_message(body) except Exception as e: print(f"Error processing message: {e}") ch.basic_nack(delivery_tag=method.delivery_tag, requeue=True) def process_message(message): 处理逻辑... pass connection = pika.BlockingConnection(pika.ConnectionParameters('localhost')) channel = connection.channel() channel.queue_declare(queue='my_queue') channel.basic_qos(prefetch_count=1) channel.basic_consume(queue='my_queue', on_message_callback=callback) channel.start_consuming() 第四部分:实践与优化 在实际应用中,合理设计队列的命名空间、消息TTL、死信策略等,可以显著提升系统的健壮性和性能。此外,监控系统状态、定期清理死信队列也是维护系统健康的重要措施。 结语 消息重新入队是RabbitMQ提供的一种强大功能,它不仅增强了系统的容错能力,还为开发者提供了灵活的错误处理机制。通过上述步骤的学习和实践,相信你已经对如何在RabbitMQ中实现消息重新入队有了更深入的理解。嘿,兄弟!听我一句,你得明白,做事情可不能马虎。每一个小步骤,每一个细节,都像是你在拼图时放的一块小片儿,这块儿放对了,整幅画才好看。所以啊,在你搞设计或者实现方案的时候,千万要细心点儿,谨慎点儿,别急躁,慢慢来,细节决定成败你知道不?这样出来的成果,才能经得起推敲,让人满意!愿你在构建分布式系统时,能够充分利用RabbitMQ的强大功能,打造出更加稳定、高效的应用。
2024-08-01 15:44:54
179
素颜如水
转载文章
...,本站仅提供文章转载服务,并不拥有其所有权,也不对文章内容的真实性、准确性和合法性承担责任。 如发现本文存在侵权、违法、违规或事实不符的情况,请及时联系我们,我们将第一时间进行核实并删除相应内容。 前几天搜索了一段时间的这个,看有没有困惑的人们。哈哈 WIFI和GPRS的设置教程一、几个注意点: 1、WIFI设置应该放置在“Internet”里面,GPRS设置应该放置在“单位设置”里面。 这样做的目的就是保证在你打开IE浏览器时、或者上MSN、QQ时自动连接WIFI网络,而上WAP或者收发彩信等就会自动连接GPRS,这一点很关键,好多帖子都说在程序自动连接到Internet时使用"单位设置”,在程序自动连接到专用网络时使用也使用“单位设置”,这样就要么只能上WIFI,要么就只能上GPRS,其实智能手机没有那么傻,他完全可以按照你的要求连接。(达到这一点还需要下面的一点设置)2、可以选择GPRS设置是否需要通过WAP代理上WWW网站,具体参看以下详细设置方法 二、WIFI设置方法 1、在“开始”—“设置”—“连线”中点选“连接”,然后选择“高级”在“选择自动使用的网络”下方点“选择网络”,然后看到两个下拉空格,第一个是“在程序自动连接到Internet时,使用:”,点选“新建”,在弹出的新窗口里有“请为这些设置输入名称”,在下方空格处编辑“Internet设置”或者其他你喜欢的名字,然后点选该页面下方的 “调制解调器”里面不要填写任何东西(注意一定不要填写任何东西),再点选该页面下方的“代理服务器设置”钩选“此网路连接到Internet”,下方的“此网络使用代理服务器连接到Internet”千万不要选择,点选“ok”,wifi设置初步完成。 2、网卡设置:“开始”—“设置”—“连接”中点选“无线网络管理员”,在弹出页面的右下方点选“菜单”,点选上弹菜单中的“开启WI-FI”,如果无线路由器设置正常的话,这时点选“网络搜寻”,在新页面中的“网路名称”下方就可以看到你的无线路由器品牌如“Dlink”“TP-link”等,点选出现在“配置无线网络”下方的这个品牌名字,弹出新的窗口,在“要访问的网络”下方选择“所有可用的”,然后点选“网络适配器”,在“我的网卡连线到”项目中选择“默认Internet设置”,在“点击适配器以修改设置”下方,点选“AUSU 802.11b+g Wireless Card”,弹出新窗口,点选“使用服务器分配的IP地址”(也可以选择“使用特定的IP地址”,那么就可以省略以下步骤),并在“IP地址”栏填入公司或者单位分配给的IP,如“192.168.50.122”,在“子网掩码”填入公司的子网掩码,在 “网关”中填入公司的网关;完成这些后,点选“名称服务器”,在新窗口的“DNS”和“备用DNS”中填入公司的“DNS”,然后一路“OK”,完成网卡设定。完成以上两个设定后建议重启机器,然后就可以用WIFI上网、上QQ和MSN了。 三、GPRS设置方法 1、在“开始”—“设置”—“连接”中点选“连接”,然后选择 “高级”,在 “选择自动使用的网络”下方点“选取网络”,然后看到两个下拉空格,第二个是“在程序自动连接到专用网络时,使用:”即上面提到的“单位设定”。 2、点选“新建”,在弹出窗口里有“请为这些设置输入名称”,在下方空格处编辑“中国移动”(最好设置为这个名称),然后点选该页面下方的“调制解调器”,点选“新建”,在弹出的新页面中有“请为连接输入名称”,请填写“中国移动彩信”,在“选择调制解调器”的下拉菜单中选择“蜂窝电话线路(GPRS)” 3、然后点“下一步”,在新弹出的窗口中的“存取点名称”下放填写“cmwap”(这里一定不能填写cmnet,否则就是采用cmnet接入网络,你将面对0.03元/K的收费以及月末数百元的cmnet网络费用了) 4、继续点选“下一步”,新窗口出现“使用者名称”、“密码”、“域”,这些都不要填写,直接点选“高级”,在进阶的tcp/ip窗口中点选“使用服务器分配的IP地址”,其他不要选择 5、点选下方“服务器”,进入“高级”的“服务器”窗口,点选“使用服务器分配的地址”,然后点选“ok”退出到第4步的页面即“中国移动彩信”的设定页面,点选“完成”。这时机器会退到第1步的最终界面即“中国移动”设定页面 6、在这个页面下放,点选“代理服务器设置”,钩选“此网络连接到Internet”,然后再钩选“此网络使用代理服务器连接到Internet”,并在下方的“代理服务器”内填入“10.0.0.172” 7、接着点选该页面的“高级”,“点击代理服务器类型更改其设置”中点“HTTP”在弹出窗口中的“服务器”下填入“10.0.0.172”,端口“80”(该步骤也可以留空不填,如果不填写的话,GPRS就不能通过WAP代理上WWW网站,本人选择填写,这样在没有WIFI热点的情况下,机子也可以通过WAP代理上WWW的网站,当然选择填写的话会出现打开IE自动连接GPRS而不是连接WIFI的情况,不过可以在连接一开始时点选弹出小窗口中的“取消”来取消GPRS的连接,从而达到用WIFI连接互联网的效果) 8、点选“ok”后返回到前一个页面,点选“WAP”,在在弹出窗口中的“服务器”下填入“10.0.0.172”,端口“9201”,同样的方法,设定“安全WAP”服务器为“10.0.0.172”,端口填“9203”,设定“Socks”服务器为“10.0.0.172”,端口“1080” 9、点选“ok”返回到第6步的最终界面,再点选“ok”退出到第2步的初始页面即“网路管理”页面,再连续点选“ok”,完成设置 四、彩信设置方法 1、“开始”—“信息”—“MMS” 2、在“MMS”页面中,点选“菜单”,上弹菜单选择“MMS设定” 3、在“选择并打开一个情景式以查看更多选项”的下方点选“新建” 4、在新窗口中的“情景式名称”右边填入“中国移动彩信”,在“彩信服务器”右边填入 http://mmsc.monternet.com”,在“数据连接”右边选择“中国移动”,在“网关”右边选择“WAP1.0 网关”,在“IP地址”右边填入“10.0.0.172”,在“端口”右边填入“9201”,最后选择完成。 转载于:https://www.cnblogs.com/hzleihuan/archive/2007/12/14/994344.html 本篇文章为转载内容。原文链接:https://blog.csdn.net/weixin_30468137/article/details/98040981。 该文由互联网用户投稿提供,文中观点代表作者本人意见,并不代表本站的立场。 作为信息平台,本站仅提供文章转载服务,并不拥有其所有权,也不对文章内容的真实性、准确性和合法性承担责任。 如发现本文存在侵权、违法、违规或事实不符的情况,请及时联系我们,我们将第一时间进行核实并删除相应内容。
2023-02-23 17:26:09
84
转载
转载文章
...,本站仅提供文章转载服务,并不拥有其所有权,也不对文章内容的真实性、准确性和合法性承担责任。 如发现本文存在侵权、违法、违规或事实不符的情况,请及时联系我们,我们将第一时间进行核实并删除相应内容。 WebSocket服务器因某些原因无法正常工作(WebSocket server not working for some reasons) 我尝试使用ws创建一个非常简单的服务器,当我运行服务器node index.js并且我在我的浏览器中午餐localhost:8080时,我的控制台中没有任何内容。 我应该看到client connected on localhost:8080打印到控制台 -index.js const WebSocketServer = require('ws').Server; const wss = new WebSocketServer({port: 8080}); const onConnect = wss => console.log('client connected on localhost:8080'); Rx.Observable .fromEvent(wss, 'connection') .subscribe(onConnect); I tried to create a very simple server using ws, When i run the server node index.js and i lunch localhost:8080 in my browser nothing appear in my console. i should see client connected on localhost:8080 printed to the console -index.js const WebSocketServer = require('ws').Server; const wss = new WebSocketServer({port: 8080}); const onConnect = wss => console.log('client connected on localhost:8080'); Rx.Observable .fromEvent(wss, 'connection') .subscribe(onConnect); 原文:https://stackoverflow.com/questions/37480475 更新时间:2020-09-13 19:09 最满意答案 您无法通过直接在浏览器中打开它来连接到WebSocket。 您应该使用某个HTML页面创建HTTP服务器和响应。 在此HTML页面中,您应该包含连接到WebSocket服务器的javascript: var socket = new WebSocket("ws://localhost:8080"); You can't connect to WebSocket by open it directly in a browser. You should create HTTP server and response with some HTML page. In this HTML page you should include javascript that connects to your WebSocket server: var socket = new WebSocket("ws://localhost:8080"); 相关问答 为了证明接收到握手,服务器必须获取两条信息并将它们组合以形成响应。 第一条信息来自| Sec-WebSocket-Key | 客户端握手中的头字段: Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ== 具体而言,如上例所示,| Sec-WebSocket-Key | 标题字段的值为“dGhlIHNhbXBsZSBub25jZQ ==”,服务器 将串联字符串“258EAFA5-E914-47DA-95CA-C5AB0DC85B11” 形成字符串“dGhl ... 我找到了解决方法。 我已经修改了我的wsgi.py,现在它可以工作: import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "myapp.settings") This application object is used by any WSGI server configured to use this file. This includes Django's development server, if the WSGI ... 好吧,就我而言, RewriteBase /元素解决了这个问题。 如果有人因为shauninmann视网膜代码而遇到这个问题,我就把它留在那里。 Options -MultiViews RewriteEngine on RewriteBase / RewriteCond %{HTTP_COOKIE} HTTP_IS_RETINA [NC] RewriteCond %{REQUEST_FILENAME} !@2x RewriteRule ^(.)\ ... 如果您的服务器正在侦听端口80上的连接,它是否在谈论http? 因为如果没有,不要在端口80上侦听:端口80已经建立为携带http流量。 下一步 - ipaddress和端口一起是端点的唯一标识符。 如果远程客户端通过端口80连接到您的服务器,而不是目标IP和端口,则没有其他信息表明网络层必须识别哪个应用程序(在端口80上侦听)应该获得该数据包。 鉴于配置多个IP地址非常困难 - 在NAT上是不可能的 - 将数据包路由到正确的侦听器的唯一信息就是端口。 所以你不能让两个应用程序在同一个端口上侦听。 ... 您无法通过直接在浏览器中打开它来连接到WebSocket。 您应该使用某个HTML页面创建HTTP服务器和响应。 在此HTML页面中,您应该包含连接到WebSocket服务器的javascript: var socket = new WebSocket("ws://localhost:8080"); You can't connect to WebSocket by open it directly in a browser. You should crea ... 所以我通过握手解决了我的特殊问题,而且非常无聊。 我需要两套“\ r \ n”才能完成握手。 所以为了解决我上面描述的握手问题(Javascript WebSocket没有进入OPEN状态)我需要对我的服务器端PHP进行以下更改(注意最后的\ r \ n \ r \ n,doh) : function dohandshake($user,$buffer){ // getheaders and calcKey are confirmed working, can provide source ... 是。 独立的WebSocket服务器通常可以在任何端口上运行。 浏览器客户端打开与非HTTP(S)端口上的服务器的WebSocket连接没有问题。 默认端口为80/443的主要原因是它们是最可靠的大规模使用端口,因为它们能够遍历阻止所有其他端口上所有流量的许多企业防火墙。 如果这对您的受众来说不是问题(或者您有基于HTTP的回退),那么为WebSocket服务器使用备用端口是完全合理的(并且更容易)。 另一种选择是使用80/443端口,但使用单独的IP地址/主机名。 Yes. A standalo ... Tyrus抱怨Connection: keep-alive, Upgrade header。 Firefox在这里没有做错任何事。 关于如何处理Connection标头,Tyrus过于严格,没有遵循WebSocket规范( RFC-6455 )。 RFC 4.1中的RFC规定: 6. The request MUST contain a |Connection| header field whose value MUST include the "Upgrade" tok ... 说实话,我不能100%确定地说这是什么,但我有一个非常强烈的怀疑。 我的代码中包含了太多的命名空间,我相信在编译器等实际运行时会出现一些混乱。 显然,Microsoft.Web.Websockets和SignalR的命名空间都包含WebSocketHandler。 虽然我不知道SignalR的所有细节,但看起来THAT命名空间中的WebSocketHandler并不意味着在SignalR之外使用。 我相信这个类正在被引用,而不是Microsoft.Web.Websockets中的那个,因为它现在起 ... 您应该使用websocket处理程序,而不是请求处理程序,尝试使用此示例 You should use the websocket handler, not the request handler, try with this example 本篇文章为转载内容。原文链接:https://blog.csdn.net/weixin_34862561/article/details/119512220。 该文由互联网用户投稿提供,文中观点代表作者本人意见,并不代表本站的立场。 作为信息平台,本站仅提供文章转载服务,并不拥有其所有权,也不对文章内容的真实性、准确性和合法性承担责任。 如发现本文存在侵权、违法、违规或事实不符的情况,请及时联系我们,我们将第一时间进行核实并删除相应内容。
2023-03-19 12:00:21
52
转载
HessianRPC
服务降级:服务降级策略不足,导致高负载时用户体验差 1. 问题背景与情绪共鸣 作为一个程序员,我深知服务降级的重要性。特别是在人多的时候,比如大家都在抢红包或者同时点开一个热门页面,要是咱们的服务降级方案没做好,那用户就可能觉得操作特别卡,或者某些功能突然用不了了,搞不好还会直接把App给关了走人。哎呀妈呀,这体验真的太折磨人了!我最近在捣鼓 HessianRPC 框架的时候,就被这个破问题给整懵圈了。 记得有一次我们的系统突然遭遇了流量高峰,结果服务器直接崩了,用户反馈说页面加载特别慢,有的功能根本点不开。我当时心里就嘀咕开了:“哎呀,总不能就这么干让用户体验卡在这儿吧?”后来一通排查下来,才发现是我们家的服务降级方案掉链子了。嘿,我最近琢磨起了HessianRPC里的服务降级功能,觉得挺有意思的,干脆好好研究一番,顺便把我的小心得跟大家唠唠! 2. HessianRPC简介及初探 HessianRPC是一个轻量级的远程调用框架,主要用于Java应用程序之间的通信。它支持多种协议,比如HTTP、TCP等,非常适合构建分布式系统。不过,HessianRPC本身并没有内置的服务降级功能,所以我们需要手动去实现。 刚开始接触HessianRPC的时候,我觉得它的API还挺简洁的。比如,我们可以定义一个接口: java public interface HelloService { String sayHello(String name); } 然后通过代理类来调用这个接口的方法: java HessianProxyFactory factory = new HessianProxyFactory(); HelloService helloService = (HelloService) factory.create(HelloService.class, "http://localhost:8080/hello"); String result = helloService.sayHello("World"); System.out.println(result); 看到这段代码的时候,我心里想着:“嗯,看起来挺简单的嘛!”但是,当我尝试在高负载情况下运行它时,才发现事情并没有那么简单。 3. 服务降级的重要性与实践 服务降级的核心思想就是在系统资源紧张时,优先保证核心业务的正常运转,而暂时关闭一些非关键的功能。对于HessianRPC来说,我们可以通过异常捕获的方式来实现这一点。 假设我们现在有一个UserService,其中包含了一个getUserInfo()方法。要是咱们直接用这个方法,后端服务要是挂了,程序立马就“崩”了,那用户的体验肯定惨不忍睹啊!所以,我们需要对这个方法进行改造,加入降级逻辑。 java public class UserServiceFallback implements UserService { @Override public UserInfo getUserInfo(int userId) { // 返回默认值 return new UserInfo(-1, "Default User", "No Data Available"); } } 接着,在主逻辑中使用装饰器模式来包裹原始的服务: java public class UserServiceDecorator implements UserService { private final UserService userService; private final UserService fallback; public UserServiceDecorator(UserService userService, UserService fallback) { this.userService = userService; this.fallback = fallback; } @Override public UserInfo getUserInfo(int userId) { try { return userService.getUserInfo(userId); } catch (Exception e) { System.err.println("Service unavailable, falling back..."); return fallback.getUserInfo(userId); } } } 通过这种方式,即使后端服务出现问题,我们也能够提供一个友好的备用方案,不至于让用户感到困惑。 4. 面临挑战与解决方案 当然,实际开发过程中总会遇到各种意想不到的问题。比如说,当多个服务同时发生故障时,我们应该如何合理分配降级策略?另外,频繁触发降级会不会影响性能? 为了解决这些问题,我们可以引入熔断器模式(Circuit Breaker Pattern)。简单讲啊,就好比给系统装了个“自动切换”的小开关。要是某个服务老是连不上,失败个好几次之后,这个开关就会自动启动,直接给用户返回个备用的数据,省得一直傻乎乎地去重试那个挂掉的服务,多浪费时间啊! 下面是一个基于HessianRPC的熔断器实现: java public class CircuitBreaker { private final T delegate; private boolean open = false; private int failureCount = 0; public CircuitBreaker(T delegate) { this.delegate = delegate; } public T getDelegate() { if (open && failureCount > 5) { return null; // 返回null表示断路器处于打开状态 } return delegate; } public void recordFailure() { failureCount++; if (failureCount >= 5) { open = true; } } } 将熔断器集成到之前的装饰器中: java public class CircuitBreakingUserServiceDecorator implements UserService { private final CircuitBreaker circuitBreaker; public CircuitBreakingUserServiceDecorator(CircuitBreaker circuitBreaker) { this.circuitBreaker = circuitBreaker; } @Override public UserInfo getUserInfo(int userId) { UserService userService = circuitBreaker.getDelegate(); if (userService == null) { return new UserInfo(-1, "Circuit Opened", "Service Unavailable"); } try { return userService.getUserInfo(userId); } catch (Exception e) { circuitBreaker.recordFailure(); return new UserInfo(-1, "Fallback User", "Service Unavailable"); } } } 这样,我们就能够在一定程度上缓解高负载带来的压力,并且确保系统的稳定性。 5. 总结与展望 回顾这次经历,我深刻体会到服务降级并不是一件轻松的事情。这事儿吧,不光得靠技术硬功夫,还得会提前打算,脑子转得也得快,不然真容易手忙脚乱。虽然HessianRPC没有提供现成的服务降级工具,但通过灵活运用设计模式,我们完全可以打造出适合自己项目的解决方案。 未来,我希望能够在更多场景下探索HessianRPC的应用潜力,同时也期待社区能够推出更加完善的降级框架,让开发者们少走弯路。毕竟,谁不想写出既高效又优雅的代码呢?如果你也有类似的经历或想法,欢迎随时交流讨论!
2025-05-01 15:44:28
16
半夏微凉
MemCache
最近,随着云计算和微服务架构的普及,越来越多的企业开始将MemCache作为其技术栈的一部分。然而,除了服务连接超时这样的常见问题外,MemCache还面临着其他挑战。例如,在大规模分布式系统中,如何保证数据的一致性和可靠性成为了一个重要的课题。近期,某知名电商平台在大促期间遭遇了MemCache集群崩溃的情况,导致部分订单数据丢失,给公司带来了巨大的经济损失。事后调查显示,问题的根本原因在于MemCache的主从同步机制未能及时应对突发流量,加上监控系统的滞后,未能第一时间发现问题并采取措施。 针对这一事件,业内专家提出了几点改进建议。首先,应该引入更先进的分布式一致性协议,如Paxos或Raft算法,确保在节点故障时数据不会丢失。其次,加强监控系统的实时性,利用Prometheus等工具对MemCache的各项指标进行持续跟踪,一旦发现异常立即触发报警。此外,还可以考虑采用多活架构,即在同一地区部署多个MemCache集群,当某个集群出现问题时,能够迅速切换到备用集群,从而最大限度地降低业务中断的风险。 与此同时,开源社区也在不断推进MemCache的功能完善。例如,最新的MemCache版本已经支持动态扩容,这意味着企业在高峰期可以通过快速增加节点来应对流量激增。同时,新的插件机制也让开发者可以根据自身需求定制化功能,比如添加额外的安全认证层或者优化数据压缩算法。 总之,MemCache作为一种高效的缓存解决方案,在现代IT基础设施中扮演着不可或缺的角色。但要想充分发挥其潜力,企业必须正视潜在风险,积极拥抱技术创新,才能在激烈的市场竞争中立于不败之地。
2025-04-08 15:44:16
87
雪落无痕
转载文章
...,本站仅提供文章转载服务,并不拥有其所有权,也不对文章内容的真实性、准确性和合法性承担责任。 如发现本文存在侵权、违法、违规或事实不符的情况,请及时联系我们,我们将第一时间进行核实并删除相应内容。 pi-hole Lots of folks ask me about Raspberry Pis. How many I have, what I use them for. At last count there's at least 22 Raspberry Pis in use in our house. 很多人问我关于树莓派。 我有多少,我用它们做什么。 最后算一下,我们家至少有22台Raspberry Pi。 One runs our dakboard family dashboard that we built in a weekend but use every day. 一个运行在周末建立但每天使用的dakboard系列仪表板。 We have at 3 that are set up for retrogaming - one in a 3d printed Gameboy (A pi-grrl, in fact), one in a X-Arcade Tankstick, one in a tiny laser-cut arcade case for the desktop. 我们有3个可以进行复古游戏的游戏-一个是3D打印的Gameboy (实际上是pi-grrl ),一个是X-Arcade Tankstick ,一个是用于台式机的小型激光切割游戏机。 I have a Raspberry Pi that runs one of my 3D Printers running Octoprint. This one also has as camera and does time-lapse videos of my 3D prints. 我有一台Raspberry Pi,它运行我的一台运行Octoprint的3D打印机。 这也有作为相机,并播放我的3D打印的延时视频。 We have another 3 that run little robots my sons and I have built 我们还有3个运行着我儿子和我建造的小机器人 6 are running in a local Kubernetes Cluster 6在本地Kubernetes集群中运行 These 6 Pis are my personal cloud, so maybe there's 16 Pis in the house and one Pi Cloud/Cluster. 这6个Pis是我的个人云,所以也许房子里有16个Pis和一个Pi Cloud / Cluster。 6 are running in a local Kubernetes Cluster 6在本地Kubernetes集群中运行 One is an internet radio in the 13 year old's room running PiMusicBox. 一个是13岁的房间里运行PiMusicBox的互联网广播。 One is a touchscreen tablet the 11 year old uses for Scratch. Imagine a Linux iPad. 一个是11岁的Scratch使用的触摸屏平板电脑。 想象一下一个Linux iPad。 One runs Kodi as an entertainment center in the kids' play room. 其中一个将科迪作为儿童游乐室的娱乐中心。 One lives in a CrowPi that we use for experiments and .NET Core remote debugging. 一个住在我们用于实验和.NET Core远程调试的CrowPi中。 Another three are Raspbery Pi Zero Ws for various experiments with one Pi Zero W acting as as backup Open Source Artificial Pancreas. 另外三个是Raspbery Pi Zero Ws,用于各种实验,其中一个Pi Zero W作为备用开源人工胰腺。 and most recently one is a Pi-hole. A Black hole that eats tracking cookies, advertising, and other bad stuff. See also "shut your pie hole." AKA that place you put pie. 最近的一个是PiKong。 一个黑洞,它吞噬了跟踪Cookie,广告和其他不良内容。 另请参阅“关闭派Kong” 。 又就是你放馅饼的那个地方。 A Pi-hole is a Raspbery Pi appliance that takes the form of an DNS blocker at the network level. You image a Pi, set up your network to use that Pi as a DNS server and maybe white-list a few sites when things don't work. PiKong是Raspbery Pi设备,在网络级别采用DNS阻止程序的形式。 您对Pi进行映像,将网络设置为将该Pi用作DNS服务器,并在无法正常工作时将一些站点列入白名单。 I was initially skeptical, but I'm giving it a try. It doesn't process all network traffic, it's a DNS hop on the way out that intercepts DNS requests for known problematic sites and serves back nothing. 最初我对此表示怀疑,但现在尝试一下。 它不会处理所有网络流量,它是途中的DNS跃点,可拦截对已知问题站点的DNS请求,并且不提供任何服务。 Installation is trivial if you just run unread and untrusted code from the 'net ;) 如果您只是从'net;)运行未读和不受信任的代码,则安装很简单。 curl -sSL https://install.pi-hole.net | bash Otherwise, follow their instructions and download the installer, study it, and run it. 否则,请遵循他们的指示并下载安装程序,对其进行研究并运行。 I put my pi-hole installation on the metal, but there's also a very nice Docker Pi-hole setup if you prefer that. You can even go further, if, like me, you have Synology NAS which can also run Docker, which can in turn run a Pi-hole. 我将pi-hole安装在金属上,但是如果您愿意的话,还有一个非常好的Docker Pi-hole设置。 如果像我一样,如果您拥有也可以运行Docker的Synology NAS ,那么它甚至可以运行Pi-hole,您甚至可以走得更远。 Within the admin interface you can tail the logs for the entire network, which is also amazing to see. You think you know what's talking to the internet from your house - you don't. Everything is logged and listed. After installing the Pi-hole roughly 18% of the DNS queries heading out of my house were blocked. At one point over 23% were blocked. Oy. 在管理界面中,您可以跟踪整个网络的日志,这也很令人惊讶。 您认为自己知道从家里到互联网的谈话内容,而您却不知道。 一切都记录并列出。 安装完Pi漏洞后,大约有18%的DNS查询从我家出来。 一度超过23%被阻止。 哦 NOTE: If you're using an Amplifi HD or any "clever" router, you'll want to change the setting "Bypass DNS cache" otherwise the Amplifi will still remain the DNS lookup of choice on your network. This setting will also confuse the Pi-hole and you'll end up with just one "client" of the Pi-hole - the router itself. 注意:如果您使用Amplifi HD或任何“智能”路由器,则需要更改设置“绕过DNS缓存”,否则Amplifi仍将是您网络上首选的DNS查找。 此设置还会混淆PiKong,您最终只会得到PiKong的一个“客户端”,即路由器本身。 For me it's less about advertising - especially on small blogs or news sites I want to support - it's about just obnoxious tracking cookies and JavaScript. I'm going to keep using Pi-hole for a few months and see how it goes. Do be aware that some things WILL break. Could be a kid's iPhone free-to-play game that won't work unless it can download an add, could be your company's VPN. You'll need to log into http://pi.hole/admin (make sure you save your password when you first install, and you can only change it at the SSH command line with "pihole -a -p") and sometimes disable it for a few minutes to test, then whitelist certain domains. I suspect after a few weeks I'll have it nicely dialed in. 对我来说,它与广告无关,尤其是在我要支持的小型博客或新闻网站上,它只是关于令人讨厌的跟踪cookie和JavaScript。 我将继续使用Pi-hole几个月,看看效果如何。 请注意,有些事情会中断。 可能是一个孩子的iPhone免费游戏,除非可以下载附件,否则它将无法正常工作,可能是您公司的VPN。 您需要登录http://pi.hole/admin (确保在首次安装时保存密码,并且只能在SSH命令行中使用“ pihole -a -p”更改密码),有时将其禁用几分钟以进行测试,然后将某些域列入白名单。 我怀疑几周后我会拨好电话。 翻译自: https://www.hanselman.com/blog/blocking-ads-before-they-enter-your-house-at-the-dns-level-with-pihole-and-a-cheap-raspberry-pi pi-hole 本篇文章为转载内容。原文链接:https://blog.csdn.net/cunfusq0176/article/details/109051003。 该文由互联网用户投稿提供,文中观点代表作者本人意见,并不代表本站的立场。 作为信息平台,本站仅提供文章转载服务,并不拥有其所有权,也不对文章内容的真实性、准确性和合法性承担责任。 如发现本文存在侵权、违法、违规或事实不符的情况,请及时联系我们,我们将第一时间进行核实并删除相应内容。
2023-08-12 20:49:59
61
转载
转载文章
...,本站仅提供文章转载服务,并不拥有其所有权,也不对文章内容的真实性、准确性和合法性承担责任。 如发现本文存在侵权、违法、违规或事实不符的情况,请及时联系我们,我们将第一时间进行核实并删除相应内容。 介绍Postgres-XL Postgres-XL 全称为 Postgres eXtensible Lattice,是TransLattice公司及其收购数据库技术公司–StormDB的产品。Postgres-XL是一个横向扩展的开源数据库集群,具有足够的灵活性来处理不同的数据库任务。 Postgres-XL功能特性 开放源代码:(源协议使用宽松的“Mozilla Public License”许可,允许将开源代码与闭源代码混在一起使用。) 完全的ACID支持 可横向扩展的关系型数据库(RDBMS) 支持OLAP应用,采用MPP(Massively Parallel Processing:大规模并行处理系统)架构模式 支持OLTP应用,读写性能可扩展 集群级别的ACID特性 多租户安全 也可被用作分布式Key-Value存储 事务处理与数据分析处理混合型数据库 支持丰富的SQL语句类型,比如:关联子查询 支持绝大部分PostgreSQL的SQL语句 分布式多版本并发控制(MVCC:Multi-version Concurrency Control) 支持JSON和XML格式 Postgres-XL缺少的功能 内建的高可用机制 使用外部机制实现高可能,如:Corosync/Pacemaker 有未来功能提升的空间 增加节点/重新分片数据(re-shard)的简便性 数据重分布(redistribution)期间会锁表 可采用预分片(pre-shard)方式解决,在同台物理服务器上建立多个数据节点,每个节点存储一个数据分片。数据重分布时,将一些数据节点迁出即可 某些外键、唯一性约束功能 Postgres-XL架构 [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-M9lFuEIP-1640133702200)(./assets/postgre-xl.jpg)] 基于开源项目Postgres-XC XL增加了MPP,允许数据节点间直接通讯,交换复杂跨节点关联查询相关数据信息,减少协调器负载。 多个协调器(Coordinator) 应用程序的数据库连入点 分析查询语句,生成执行计划 多个数据节点(DataNode) 实际的数据存储 数据自动打散分布到集群中各数据节点 本地执行查询 一个查询在所有相关节点上并行查询 全局事务管理器(GTM:Global Transaction Manager) 提供事务间一致性视图 部署GTM Proxy实例,以提高性能 Postgre-XL主要组件 GTM (Global Transaction Manager) - 全局事务管理器 GTM是Postgres-XL的一个关键组件,用于提供一致的事务管理和元组可见性控制。 GTM Standby GTM的备节点,在pgxc,pgxl中,GTM控制所有的全局事务分配,如果出现问题,就会导致整个集群不可用,为了增加可用性,增加该备用节点。当GTM出现问题时,GTM Standby可以升级为GTM,保证集群正常工作。 GTM-Proxy GTM需要与所有的Coordinators通信,为了降低压力,可以在每个Coordinator机器上部署一个GTM-Proxy。 Coordinator --协调器 协调器是应用程序到数据库的接口。它的作用类似于传统的PostgreSQL后台进程,但是协调器不存储任何实际数据。实际数据由数据节点存储。协调器接收SQL语句,根据需要获取全局事务Id和全局快照,确定涉及哪些数据节点,并要求它们执行(部分)语句。当向数据节点发出语句时,它与GXID和全局快照相关联,以便多版本并发控制(MVCC)属性扩展到集群范围。 Datanode --数据节点 用于实际存储数据。表可以分布在各个数据节点之间,也可以复制到所有数据节点。数据节点没有整个数据库的全局视图,它只负责本地存储的数据。接下来,协调器将检查传入语句,并制定子计划。然后,根据需要将这些数据连同GXID和全局快照一起传输到涉及的每个数据节点。数据节点可以在不同的会话中接收来自各个协调器的请求。但是,由于每个事务都是惟一标识的,并且与一致的(全局)快照相关联,所以每个数据节点都可以在其事务和快照上下文中正确执行。 Postgres-XL继承了PostgreSQL Postgres-XL是PostgreSQL的扩展并继承了其很多特性: 复杂查询 外键 触发器 视图 事务 MVCC(多版本控制) 此外,类似于PostgreSQL,用户可以通过多种方式扩展Postgres-XL,例如添加新的 数据类型 函数 操作 聚合函数 索引类型 过程语言 安装 环境说明 由于资源有限,gtm一台、另外两台身兼数职。 主机名 IP 角色 端口 nodename 数据目录 gtm 192.168.20.132 GTM 6666 gtm /nodes/gtm 协调器 5432 coord1 /nodes/coordinator xl1 192.168.20.133 数据节点 5433 node1 /nodes/pgdata gtm代理 6666 gtmpoxy01 /nodes/gtm_pxy1 协调器 5432 coord2 /nodes/coordinator xl2 192.168.20.134 数据节点 5433 node2 /nodes/pgdata gtm代理 6666 gtmpoxy02 /nodes/gtm_pxy2 要求 GNU make版本 3.8及以上版本 [root@pg ~] make --versionGNU Make 3.82Built for x86_64-redhat-linux-gnuCopyright (C) 2010 Free Software Foundation, Inc.License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>This is free software: you are free to change and redistribute it.There is NO WARRANTY, to the extent permitted by law. 需安装GCC包 需安装tar包 用于解压缩文件 默认需要GNU Readline library 其作用是可以让psql命令行记住执行过的命令,并且可以通过键盘上下键切换命令。但是可以通过--without-readline禁用这个特性,或者可以指定--withlibedit-preferred选项来使用libedit 默认使用zlib压缩库 可通过--without-zlib选项来禁用 配置hosts 所有主机上都配置 [root@xl2 11] cat /etc/hosts127.0.0.1 localhost192.168.20.132 gtm192.168.20.133 xl1192.168.20.134 xl2 关闭防火墙、Selinux 所有主机都执行 关闭防火墙: [root@gtm ~] systemctl stop firewalld.service[root@gtm ~] systemctl disable firewalld.service selinux设置: [root@gtm ~]vim /etc/selinux/config 设置SELINUX=disabled,保存退出。 This file controls the state of SELinux on the system. SELINUX= can take one of these three values: enforcing - SELinux security policy is enforced. permissive - SELinux prints warnings instead of enforcing. disabled - No SELinux policy is loaded.SELINUX=disabled SELINUXTYPE= can take one of three two values: targeted - Targeted processes are protected, minimum - Modification of targeted policy. Only selected processes are protected. mls - Multi Level Security protection. 安装依赖包 所有主机上都执行 yum install -y flex bison readline-devel zlib-devel openjade docbook-style-dsssl gcc 创建用户 所有主机上都执行 [root@gtm ~] useradd postgres[root@gtm ~] passwd postgres[root@gtm ~] su - postgres[root@gtm ~] mkdir ~/.ssh[root@gtm ~] chmod 700 ~/.ssh 配置SSH免密登录 仅仅在gtm节点配置如下操作: [root@gtm ~] su - postgres[postgres@gtm ~] ssh-keygen -t rsa[postgres@gtm ~] cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys[postgres@gtm ~] chmod 600 ~/.ssh/authorized_keys 将刚生成的认证文件拷贝到xl1到xl2中,使得gtm节点可以免密码登录xl1~xl2的任意一个节点: [postgres@gtm ~] scp ~/.ssh/authorized_keys postgres@xl1:~/.ssh/[postgres@gtm ~] scp ~/.ssh/authorized_keys postgres@xl2:~/.ssh/ 对所有提示都不要输入,直接enter下一步。直到最后,因为第一次要求输入目标机器的用户密码,输入即可。 下载源码 下载地址:https://www.postgres-xl.org/download/ [root@slave ~] ll postgres-xl-10r1.1.tar.gz-rw-r--r-- 1 root root 28121666 May 30 05:21 postgres-xl-10r1.1.tar.gz 编译、安装Postgres-XL 所有节点都安装,编译需要一点时间,最好同时进行编译。 [root@slave ~] tar xvf postgres-xl-10r1.1.tar.gz[root@slave ~] ./configure --prefix=/home/postgres/pgxl/[root@slave ~] make[root@slave ~] make install[root@slave ~] cd contrib/ --安装必要的工具,在gtm节点上安装即可[root@slave ~] make[root@slave ~] make install 配置环境变量 所有节点都要配置 进入postgres用户,修改其环境变量,开始编辑 [root@gtm ~]su - postgres[postgres@gtm ~]vi .bashrc --不是.bash_profile 在打开的文件末尾,新增如下变量配置: export PGHOME=/home/postgres/pgxlexport LD_LIBRARY_PATH=$PGHOME/lib:$LD_LIBRARY_PATHexport PATH=$PGHOME/bin:$PATH 按住esc,然后输入:wq!保存退出。输入以下命令对更改重启生效。 [postgres@gtm ~] source .bashrc --不是.bash_profile 输入以下语句,如果输出变量结果,代表生效 [postgres@gtm ~] echo $PGHOME 应该输出/home/postgres/pgxl代表生效 配置集群 生成pgxc_ctl.conf配置文件 [postgres@gtm ~] pgxc_ctl prepare/bin/bashInstalling pgxc_ctl_bash script as /home/postgres/pgxl/pgxc_ctl/pgxc_ctl_bash.ERROR: File "/home/postgres/pgxl/pgxc_ctl/pgxc_ctl.conf" not found or not a regular file. No such file or directoryInstalling pgxc_ctl_bash script as /home/postgres/pgxl/pgxc_ctl/pgxc_ctl_bash.Reading configuration using /home/postgres/pgxl/pgxc_ctl/pgxc_ctl_bash --home /home/postgres/pgxl/pgxc_ctl --configuration /home/postgres/pgxl/pgxc_ctl/pgxc_ctl.confFinished reading configuration. PGXC_CTL START Current directory: /home/postgres/pgxl/pgxc_ctl 配置pgxc_ctl.conf 新建/home/postgres/pgxc_ctl/pgxc_ctl.conf文件,编辑如下: 对着模板文件一个一个修改,否则会造成初始化过程出现各种神奇问题。 pgxcInstallDir=$PGHOMEpgxlDATA=$PGHOME/data pgxcOwner=postgres---- GTM Master -----------------------------------------gtmName=gtmgtmMasterServer=gtmgtmMasterPort=6666gtmMasterDir=$pgxlDATA/nodes/gtmgtmSlave=y Specify y if you configure GTM Slave. Otherwise, GTM slave will not be configured and all the following variables will be reset.gtmSlaveName=gtmSlavegtmSlaveServer=gtm value none means GTM slave is not available. Give none if you don't configure GTM Slave.gtmSlavePort=20001 Not used if you don't configure GTM slave.gtmSlaveDir=$pgxlDATA/nodes/gtmSlave Not used if you don't configure GTM slave.---- GTM-Proxy Master -------gtmProxyDir=$pgxlDATA/nodes/gtm_proxygtmProxy=y gtmProxyNames=(gtm_pxy1 gtm_pxy2) gtmProxyServers=(xl1 xl2) gtmProxyPorts=(6666 6666) gtmProxyDirs=($gtmProxyDir $gtmProxyDir) ---- Coordinators ---------coordMasterDir=$pgxlDATA/nodes/coordcoordNames=(coord1 coord2) coordPorts=(5432 5432) poolerPorts=(6667 6667) coordPgHbaEntries=(0.0.0.0/0)coordMasterServers=(xl1 xl2) coordMasterDirs=($coordMasterDir $coordMasterDir)coordMaxWALsernder=0 没设置备份节点,设置为0coordMaxWALSenders=($coordMaxWALsernder $coordMaxWALsernder) 数量保持和coordMasterServers一致coordSlave=n---- Datanodes ----------datanodeMasterDir=$pgxlDATA/nodes/dn_masterprimaryDatanode=xl1 主数据节点datanodeNames=(node1 node2)datanodePorts=(5433 5433) datanodePoolerPorts=(6668 6668) datanodePgHbaEntries=(0.0.0.0/0)datanodeMasterServers=(xl1 xl2)datanodeMasterDirs=($datanodeMasterDir $datanodeMasterDir)datanodeMaxWalSender=4datanodeMaxWALSenders=($datanodeMaxWalSender $datanodeMaxWalSender) 集群初始化,启动,停止 初始化 pgxc_ctl -c /home/postgres/pgxc_ctl/pgxc_ctl.conf init all 输出结果: /bin/bashInstalling pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Installing pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Reading configuration using /home/postgres/pgxc_ctl/pgxc_ctl_bash --home /home/postgres/pgxc_ctl --configuration /home/postgres/pgxc_ctl/pgxc_ctl.conf/home/postgres/pgxc_ctl/pgxc_ctl.conf: line 189: $coordExtraConfig: ambiguous redirectFinished reading configuration. PGXC_CTL START Current directory: /home/postgres/pgxc_ctlStopping all the coordinator masters.Stopping coordinator master coord1.Stopping coordinator master coord2.pg_ctl: directory "/home/postgres/pgxc/nodes/coord/coord1" does not existpg_ctl: directory "/home/postgres/pgxc/nodes/coord/coord2" does not existDone.Stopping all the datanode masters.Stopping datanode master datanode1.Stopping datanode master datanode2.pg_ctl: PID file "/home/postgres/pgxc/nodes/datanode/datanode1/postmaster.pid" does not existIs server running?Done.Stop GTM masterwaiting for server to shut down.... doneserver stopped[postgres@gtm ~]$ echo $PGHOME/home/postgres/pgxl[postgres@gtm ~]$ ll /home/postgres/pgxl/pgxc/nodes/gtm/gtm.^C[postgres@gtm ~]$ pgxc_ctl -c /home/postgres/pgxc_ctl/pgxc_ctl.conf init all/bin/bashInstalling pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Installing pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Reading configuration using /home/postgres/pgxc_ctl/pgxc_ctl_bash --home /home/postgres/pgxc_ctl --configuration /home/postgres/pgxc_ctl/pgxc_ctl.conf/home/postgres/pgxc_ctl/pgxc_ctl.conf: line 189: $coordExtraConfig: ambiguous redirectFinished reading configuration. PGXC_CTL START Current directory: /home/postgres/pgxc_ctlInitialize GTM masterERROR: target directory (/home/postgres/pgxc/nodes/gtm) exists and not empty. Skip GTM initilializationDone.Start GTM masterserver startingInitialize all the coordinator masters.Initialize coordinator master coord1.ERROR: target coordinator master coord1 is running now. Skip initilialization.Initialize coordinator master coord2.The files belonging to this database system will be owned by user "postgres".This user must also own the server process.The database cluster will be initialized with locale "en_US.UTF-8".The default database encoding has accordingly been set to "UTF8".The default text search configuration will be set to "english".Data page checksums are disabled.fixing permissions on existing directory /home/postgres/pgxc/nodes/coord/coord2 ... okcreating subdirectories ... okselecting default max_connections ... 100selecting default shared_buffers ... 128MBselecting dynamic shared memory implementation ... posixcreating configuration files ... okrunning bootstrap script ... okperforming post-bootstrap initialization ... creating cluster information ... oksyncing data to disk ... okfreezing database template0 ... okfreezing database template1 ... okfreezing database postgres ... okWARNING: enabling "trust" authentication for local connectionsYou can change this by editing pg_hba.conf or using the option -A, or--auth-local and --auth-host, the next time you run initdb.Success.Done.Starting coordinator master.Starting coordinator master coord1ERROR: target coordinator master coord1 is already running now. Skip initialization.Starting coordinator master coord22019-05-30 21:09:25.562 EDT [2148] LOG: listening on IPv4 address "0.0.0.0", port 54322019-05-30 21:09:25.562 EDT [2148] LOG: listening on IPv6 address "::", port 54322019-05-30 21:09:25.563 EDT [2148] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432"2019-05-30 21:09:25.601 EDT [2149] LOG: database system was shut down at 2019-05-30 21:09:22 EDT2019-05-30 21:09:25.605 EDT [2148] LOG: database system is ready to accept connections2019-05-30 21:09:25.612 EDT [2156] LOG: cluster monitor startedDone.Initialize all the datanode masters.Initialize the datanode master datanode1.Initialize the datanode master datanode2.The files belonging to this database system will be owned by user "postgres".This user must also own the server process.The database cluster will be initialized with locale "en_US.UTF-8".The default database encoding has accordingly been set to "UTF8".The default text search configuration will be set to "english".Data page checksums are disabled.fixing permissions on existing directory /home/postgres/pgxc/nodes/datanode/datanode1 ... okcreating subdirectories ... okselecting default max_connections ... 100selecting default shared_buffers ... 128MBselecting dynamic shared memory implementation ... posixcreating configuration files ... okrunning bootstrap script ... okperforming post-bootstrap initialization ... creating cluster information ... oksyncing data to disk ... okfreezing database template0 ... okfreezing database template1 ... okfreezing database postgres ... okWARNING: enabling "trust" authentication for local connectionsYou can change this by editing pg_hba.conf or using the option -A, or--auth-local and --auth-host, the next time you run initdb.Success.The files belonging to this database system will be owned by user "postgres".This user must also own the server process.The database cluster will be initialized with locale "en_US.UTF-8".The default database encoding has accordingly been set to "UTF8".The default text search configuration will be set to "english".Data page checksums are disabled.fixing permissions on existing directory /home/postgres/pgxc/nodes/datanode/datanode2 ... okcreating subdirectories ... okselecting default max_connections ... 100selecting default shared_buffers ... 128MBselecting dynamic shared memory implementation ... posixcreating configuration files ... okrunning bootstrap script ... okperforming post-bootstrap initialization ... creating cluster information ... oksyncing data to disk ... okfreezing database template0 ... okfreezing database template1 ... okfreezing database postgres ... okWARNING: enabling "trust" authentication for local connectionsYou can change this by editing pg_hba.conf or using the option -A, or--auth-local and --auth-host, the next time you run initdb.Success.Done.Starting all the datanode masters.Starting datanode master datanode1.WARNING: datanode master datanode1 is running now. Skipping.Starting datanode master datanode2.2019-05-30 21:09:33.352 EDT [2404] LOG: listening on IPv4 address "0.0.0.0", port 154322019-05-30 21:09:33.352 EDT [2404] LOG: listening on IPv6 address "::", port 154322019-05-30 21:09:33.355 EDT [2404] LOG: listening on Unix socket "/tmp/.s.PGSQL.15432"2019-05-30 21:09:33.392 EDT [2404] LOG: redirecting log output to logging collector process2019-05-30 21:09:33.392 EDT [2404] HINT: Future log output will appear in directory "pg_log".Done.psql: FATAL: no pg_hba.conf entry for host "192.168.20.132", user "postgres", database "postgres"psql: FATAL: no pg_hba.conf entry for host "192.168.20.132", user "postgres", database "postgres"Done.psql: FATAL: no pg_hba.conf entry for host "192.168.20.132", user "postgres", database "postgres"psql: FATAL: no pg_hba.conf entry for host "192.168.20.132", user "postgres", database "postgres"Done.[postgres@gtm ~]$ pgxc_ctl -c /home/postgres/pgxc_ctl/pgxc_ctl.conf stop all/bin/bashInstalling pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Installing pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Reading configuration using /home/postgres/pgxc_ctl/pgxc_ctl_bash --home /home/postgres/pgxc_ctl --configuration /home/postgres/pgxc_ctl/pgxc_ctl.conf/home/postgres/pgxc_ctl/pgxc_ctl.conf: line 189: $coordExtraConfig: ambiguous redirectFinished reading configuration. PGXC_CTL START Current directory: /home/postgres/pgxc_ctlStopping all the coordinator masters.Stopping coordinator master coord1.Stopping coordinator master coord2.pg_ctl: directory "/home/postgres/pgxc/nodes/coord/coord1" does not existDone.Stopping all the datanode masters.Stopping datanode master datanode1.Stopping datanode master datanode2.pg_ctl: PID file "/home/postgres/pgxc/nodes/datanode/datanode1/postmaster.pid" does not existIs server running?Done.Stop GTM masterwaiting for server to shut down.... doneserver stopped[postgres@gtm ~]$ pgxc_ctl/bin/bashInstalling pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Installing pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Reading configuration using /home/postgres/pgxc_ctl/pgxc_ctl_bash --home /home/postgres/pgxc_ctl --configuration /home/postgres/pgxc_ctl/pgxc_ctl.conf/home/postgres/pgxc_ctl/pgxc_ctl.conf: line 189: $coordExtraConfig: ambiguous redirectFinished reading configuration. PGXC_CTL START Current directory: /home/postgres/pgxc_ctlPGXC monitor allNot running: gtm masterRunning: coordinator master coord1Not running: coordinator master coord2Running: datanode master datanode1Not running: datanode master datanode2PGXC stop coordinator master coord1Stopping coordinator master coord1.pg_ctl: directory "/home/postgres/pgxc/nodes/coord/coord1" does not existDone.PGXC stop datanode master datanode1Stopping datanode master datanode1.pg_ctl: PID file "/home/postgres/pgxc/nodes/datanode/datanode1/postmaster.pid" does not existIs server running?Done.PGXC monitor allNot running: gtm masterRunning: coordinator master coord1Not running: coordinator master coord2Running: datanode master datanode1Not running: datanode master datanode2PGXC monitor allNot running: gtm masterNot running: coordinator master coord1Not running: coordinator master coord2Not running: datanode master datanode1Not running: datanode master datanode2PGXC exit[postgres@gtm ~]$ pgxc_ctl -c /home/postgres/pgxc_ctl/pgxc_ctl.conf init all/bin/bashInstalling pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Installing pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Reading configuration using /home/postgres/pgxc_ctl/pgxc_ctl_bash --home /home/postgres/pgxc_ctl --configuration /home/postgres/pgxc_ctl/pgxc_ctl.conf/home/postgres/pgxc_ctl/pgxc_ctl.conf: line 189: $coordExtraConfig: ambiguous redirectFinished reading configuration. PGXC_CTL START Current directory: /home/postgres/pgxc_ctlInitialize GTM masterERROR: target directory (/home/postgres/pgxc/nodes/gtm) exists and not empty. Skip GTM initilializationDone.Start GTM masterserver startingInitialize all the coordinator masters.Initialize coordinator master coord1.Initialize coordinator master coord2.The files belonging to this database system will be owned by user "postgres".This user must also own the server process.The database cluster will be initialized with locale "en_US.UTF-8".The default database encoding has accordingly been set to "UTF8".The default text search configuration will be set to "english".Data page checksums are disabled.fixing permissions on existing directory /home/postgres/pgxc/nodes/coord/coord1 ... okcreating subdirectories ... okselecting default max_connections ... 100selecting default shared_buffers ... 128MBselecting dynamic shared memory implementation ... posixcreating configuration files ... okrunning bootstrap script ... okperforming post-bootstrap initialization ... creating cluster information ... oksyncing data to disk ... okfreezing database template0 ... okfreezing database template1 ... okfreezing database postgres ... okWARNING: enabling "trust" authentication for local connectionsYou can change this by editing pg_hba.conf or using the option -A, or--auth-local and --auth-host, the next time you run initdb.Success.The files belonging to this database system will be owned by user "postgres".This user must also own the server process.The database cluster will be initialized with locale "en_US.UTF-8".The default database encoding has accordingly been set to "UTF8".The default text search configuration will be set to "english".Data page checksums are disabled.fixing permissions on existing directory /home/postgres/pgxc/nodes/coord/coord2 ... okcreating subdirectories ... okselecting default max_connections ... 100selecting default shared_buffers ... 128MBselecting dynamic shared memory implementation ... posixcreating configuration files ... okrunning bootstrap script ... okperforming post-bootstrap initialization ... creating cluster information ... oksyncing data to disk ... okfreezing database template0 ... okfreezing database template1 ... okfreezing database postgres ... okWARNING: enabling "trust" authentication for local connectionsYou can change this by editing pg_hba.conf or using the option -A, or--auth-local and --auth-host, the next time you run initdb.Success.Done.Starting coordinator master.Starting coordinator master coord1Starting coordinator master coord22019-05-30 21:13:03.998 EDT [25137] LOG: listening on IPv4 address "0.0.0.0", port 54322019-05-30 21:13:03.998 EDT [25137] LOG: listening on IPv6 address "::", port 54322019-05-30 21:13:04.000 EDT [25137] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432"2019-05-30 21:13:04.038 EDT [25138] LOG: database system was shut down at 2019-05-30 21:13:00 EDT2019-05-30 21:13:04.042 EDT [25137] LOG: database system is ready to accept connections2019-05-30 21:13:04.049 EDT [25145] LOG: cluster monitor started2019-05-30 21:13:04.020 EDT [2730] LOG: listening on IPv4 address "0.0.0.0", port 54322019-05-30 21:13:04.020 EDT [2730] LOG: listening on IPv6 address "::", port 54322019-05-30 21:13:04.021 EDT [2730] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432"2019-05-30 21:13:04.057 EDT [2731] LOG: database system was shut down at 2019-05-30 21:13:00 EDT2019-05-30 21:13:04.061 EDT [2730] LOG: database system is ready to accept connections2019-05-30 21:13:04.062 EDT [2738] LOG: cluster monitor startedDone.Initialize all the datanode masters.Initialize the datanode master datanode1.Initialize the datanode master datanode2.The files belonging to this database system will be owned by user "postgres".This user must also own the server process.The database cluster will be initialized with locale "en_US.UTF-8".The default database encoding has accordingly been set to "UTF8".The default text search configuration will be set to "english".Data page checksums are disabled.fixing permissions on existing directory /home/postgres/pgxc/nodes/datanode/datanode1 ... okcreating subdirectories ... okselecting default max_connections ... 100selecting default shared_buffers ... 128MBselecting dynamic shared memory implementation ... posixcreating configuration files ... okrunning bootstrap script ... okperforming post-bootstrap initialization ... creating cluster information ... oksyncing data to disk ... okfreezing database template0 ... okfreezing database template1 ... okfreezing database postgres ... okWARNING: enabling "trust" authentication for local connectionsYou can change this by editing pg_hba.conf or using the option -A, or--auth-local and --auth-host, the next time you run initdb.Success.The files belonging to this database system will be owned by user "postgres".This user must also own the server process.The database cluster will be initialized with locale "en_US.UTF-8".The default database encoding has accordingly been set to "UTF8".The default text search configuration will be set to "english".Data page checksums are disabled.fixing permissions on existing directory /home/postgres/pgxc/nodes/datanode/datanode2 ... okcreating subdirectories ... okselecting default max_connections ... 100selecting default shared_buffers ... 128MBselecting dynamic shared memory implementation ... posixcreating configuration files ... okrunning bootstrap script ... okperforming post-bootstrap initialization ... creating cluster information ... oksyncing data to disk ... okfreezing database template0 ... okfreezing database template1 ... okfreezing database postgres ... okWARNING: enabling "trust" authentication for local connectionsYou can change this by editing pg_hba.conf or using the option -A, or--auth-local and --auth-host, the next time you run initdb.Success.Done.Starting all the datanode masters.Starting datanode master datanode1.Starting datanode master datanode2.2019-05-30 21:13:12.077 EDT [25392] LOG: listening on IPv4 address "0.0.0.0", port 154322019-05-30 21:13:12.077 EDT [25392] LOG: listening on IPv6 address "::", port 154322019-05-30 21:13:12.079 EDT [25392] LOG: listening on Unix socket "/tmp/.s.PGSQL.15432"2019-05-30 21:13:12.114 EDT [25392] LOG: redirecting log output to logging collector process2019-05-30 21:13:12.114 EDT [25392] HINT: Future log output will appear in directory "pg_log".2019-05-30 21:13:12.079 EDT [2985] LOG: listening on IPv4 address "0.0.0.0", port 154322019-05-30 21:13:12.079 EDT [2985] LOG: listening on IPv6 address "::", port 154322019-05-30 21:13:12.081 EDT [2985] LOG: listening on Unix socket "/tmp/.s.PGSQL.15432"2019-05-30 21:13:12.117 EDT [2985] LOG: redirecting log output to logging collector process2019-05-30 21:13:12.117 EDT [2985] HINT: Future log output will appear in directory "pg_log".Done.psql: FATAL: no pg_hba.conf entry for host "192.168.20.132", user "postgres", database "postgres"psql: FATAL: no pg_hba.conf entry for host "192.168.20.132", user "postgres", database "postgres"Done.psql: FATAL: no pg_hba.conf entry for host "192.168.20.132", user "postgres", database "postgres"psql: FATAL: no pg_hba.conf entry for host "192.168.20.132", user "postgres", database "postgres"Done. 启动 pgxc_ctl -c /home/postgres/pgxc_ctl/pgxc_ctl.conf start all 关闭 pgxc_ctl -c /home/postgres/pgxc_ctl/pgxc_ctl.conf stop all 查看集群状态 [postgres@gtm ~]$ pgxc_ctl monitor all/bin/bashInstalling pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Installing pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Reading configuration using /home/postgres/pgxc_ctl/pgxc_ctl_bash --home /home/postgres/pgxc_ctl --configuration /home/postgres/pgxc_ctl/pgxc_ctl.conf/home/postgres/pgxc_ctl/pgxc_ctl.conf: line 189: $coordExtraConfig: ambiguous redirectFinished reading configuration. PGXC_CTL START Current directory: /home/postgres/pgxc_ctlRunning: gtm masterRunning: coordinator master coord1Running: coordinator master coord2Running: datanode master datanode1Running: datanode master datanode2 配置集群信息 分别在数据节点、协调器节点上分别执行以下命令: 注:本节点只执行修改操作即可(alert node),其他节点执行创建命令(create node)。因为本节点已经包含本节点的信息。 create node coord1 with (type=coordinator,host=xl1, port=5432);create node coord2 with (type=coordinator,host=xl2, port=5432);alter node coord1 with (type=coordinator,host=xl1, port=5432);alter node coord2 with (type=coordinator,host=xl2, port=5432);create node datanode1 with (type=datanode, host=xl1,port=15432,primary=true,PREFERRED);create node datanode2 with (type=datanode, host=xl2,port=15432);alter node datanode1 with (type=datanode, host=xl1,port=15432,primary=true,PREFERRED);alter node datanode2 with (type=datanode, host=xl2,port=15432);select pgxc_pool_reload(); 分别登陆数据节点、协调器节点验证 postgres= select from pgxc_node;node_name | node_type | node_port | node_host | nodeis_primary | nodeis_preferred | node_id-----------+-----------+-----------+-----------+----------------+------------------+-------------coord1 | C | 5432 | xl1 | f | f | 1885696643coord2 | C | 5432 | xl2 | f | f | -1197102633datanode2 | D | 15432 | xl2 | f | f | -905831925datanode1 | D | 15432 | xl1 | t | f | 888802358(4 rows) 测试 插入数据 在数据节点1,执行相关操作。 通过协调器端口登录PG [postgres@xl1 ~]$ psql -p 5432psql (PGXL 10r1.1, based on PG 10.6 (Postgres-XL 10r1.1))Type "help" for help.postgres= create database lei;CREATE DATABASEpostgres= \c lei;You are now connected to database "lei" as user "postgres".lei= create table test1(id int,name text);CREATE TABLElei= insert into test1(id,name) select generate_series(1,8),'测试';INSERT 0 8lei= select from test1;id | name----+------1 | 测试2 | 测试5 | 测试6 | 测试8 | 测试3 | 测试4 | 测试7 | 测试(8 rows) 注:默认创建的表为分布式表,也就是每个数据节点值存储表的部分数据。关于表类型具体说明,下面有说明。 通过15432端口登录数据节点,查看数据 有5条数据 [postgres@xl1 ~]$ psql -p 15432psql (PGXL 10r1.1, based on PG 10.6 (Postgres-XL 10r1.1))Type "help" for help.postgres= \c lei;You are now connected to database "lei" as user "postgres".lei= select from test1;id | name----+------1 | 测试2 | 测试5 | 测试6 | 测试8 | 测试(5 rows) 登录到节点2,查看数据 有3条数据 [postgres@xl2 ~]$ psql -p15432psql (PGXL 10r1.1, based on PG 10.6 (Postgres-XL 10r1.1))Type "help" for help.postgres= \c lei;You are now connected to database "lei" as user "postgres".lei= select from test1;id | name----+------3 | 测试4 | 测试7 | 测试(3 rows) 两个节点的数据加起来整个8条,没有问题。 至此Postgre-XL集群搭建完成。 创建数据库、表时可能会出现以下错误: ERROR: Failed to get pooled connections 是因为pg_hba.conf配置不对,所有节点加上host all all 192.168.20.0/0 trust并重启集群即可。 ERROR: No Datanode defined in cluster 首先确认是否创建了数据节点,也就是create node相关的命令。如果创建了则执行select pgxc_pool_reload();使其生效即可。 集群管理与应用 表类型说明 REPLICATION表:各个datanode节点中,表的数据完全相同,也就是说,插入数据时,会分别在每个datanode节点插入相同数据。读数据时,只需要读任意一个datanode节点上的数据。 建表语法: CREATE TABLE repltab (col1 int, col2 int) DISTRIBUTE BY REPLICATION; DISTRIBUTE :会将插入的数据,按照拆分规则,分配到不同的datanode节点中存储,也就是sharding技术。每个datanode节点只保存了部分数据,通过coordinate节点可以查询完整的数据视图。 CREATE TABLE disttab(col1 int, col2 int, col3 text) DISTRIBUTE BY HASH(col1); 模拟数据插入 任意登录一个coordinate节点进行建表操作 [postgres@gtm ~]$ psql -h xl1 -p 5432 -U postgrespostgres= INSERT INTO disttab SELECT generate_series(1,100), generate_series(101, 200), 'foo';INSERT 0 100postgres= INSERT INTO repltab SELECT generate_series(1,100), generate_series(101, 200);INSERT 0 100 查看数据分布结果: DISTRIBUTE表分布结果 postgres= SELECT xc_node_id, count() FROM disttab GROUP BY xc_node_id;xc_node_id | count ------------+-------1148549230 | 42-927910690 | 58(2 rows) REPLICATION表分布结果 postgres= SELECT count() FROM repltab;count -------100(1 row) 查看另一个datanode2中repltab表结果 [postgres@datanode2 pgxl9.5]$ psql -p 15432psql (PGXL 10r1.1, based on PG 10.6 (Postgres-XL 10r1.1))Type "help" for help.postgres= SELECT count() FROM repltab;count -------100(1 row) 结论:REPLICATION表中,datanode1,datanode2中表是全部数据,一模一样。而DISTRIBUTE表,数据散落近乎平均分配到了datanode1,datanode2节点中。 新增数据节点与数据重分布 在线新增节点、并重新分布数据。 新增datanode节点 在gtm集群管理节点上执行pgxc_ctl命令 [postgres@gtm ~]$ pgxc_ctl/bin/bashInstalling pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Installing pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Reading configuration using /home/postgres/pgxc_ctl/pgxc_ctl_bash --home /home/postgres/pgxc_ctl --configuration /home/postgres/pgxc_ctl/pgxc_ctl.confFinished reading configuration. PGXC_CTL START Current directory: /home/postgres/pgxc_ctlPGXC 在服务器xl3上,新增一个master角色的datanode节点,名称是datanode3 端口号暂定5430,pool master暂定6669 ,指定好数据目录位置,从两个节点升级到3个节点,之后要写3个none none应该是datanodeSpecificExtraConfig或者datanodeSpecificExtraPgHba配置PGXC add datanode master datanode3 xl3 15432 6671 /home/postgres/pgxc/nodes/datanode/datanode3 none none none 等待新增完成后,查询集群节点状态: postgres= select from pgxc_node;node_name | node_type | node_port | node_host | nodeis_primary | nodeis_preferred | node_id-----------+-----------+-----------+-----------+----------------+------------------+-------------datanode1 | D | 15432 | xl1 | t | f | 888802358datanode2 | D | 15432 | xl2 | f | f | -905831925datanode3 | D | 15432 | xl3 | f | f | -705831925coord1 | C | 5432 | xl1 | f | f | 1885696643coord2 | C | 5432 | xl2 | f | f | -1197102633(4 rows) 节点新增完毕 数据重新分布 由于新增节点后无法自动完成数据重新分布,需要手动操作。 DISTRIBUTE表分布在了node1,node2节点上,如下: postgres= SELECT xc_node_id, count() FROM disttab GROUP BY xc_node_id;xc_node_id | count ------------+-------1148549230 | 42-927910690 | 58(2 rows) 新增一个节点后,将sharding表数据重新分配到三个节点上,将repl表复制到新节点 重分布sharding表postgres= ALTER TABLE disttab ADD NODE (datanode3);ALTER TABLE 复制数据到新节点postgres= ALTER TABLE repltab ADD NODE (datanode3);ALTER TABLE 查看新的数据分布: postgres= SELECT xc_node_id, count() FROM disttab GROUP BY xc_node_id;xc_node_id | count ------------+--------700122826 | 36-927910690 | 321148549230 | 32(3 rows) 登录datanode3(新增的时候,放在了xl3服务器上,端口15432)节点查看数据: [postgres@gtm ~]$ psql -h xl3 -p 15432 -U postgrespsql (PGXL 10r1.1, based on PG 10.6 (Postgres-XL 10r1.1))Type "help" for help.postgres= select count() from repltab;count -------100(1 row) 很明显,通过 ALTER TABLE tt ADD NODE (dn)命令,可以将DISTRIBUTE表数据重新分布到新节点,重分布过程中会中断所有事务。可以将REPLICATION表数据复制到新节点。 从datanode节点中回收数据 postgres= ALTER TABLE disttab DELETE NODE (datanode3);ALTER TABLEpostgres= ALTER TABLE repltab DELETE NODE (datanode3);ALTER TABLE 删除数据节点 Postgresql-XL并没有检查将被删除的datanode节点是否有replicated/distributed表的数据,为了数据安全,在删除之前需要检查下被删除节点上的数据,有数据的话,要回收掉分配到其他节点,然后才能安全删除。删除数据节点分为四步骤: 1.查询要删除节点dn3的oid postgres= SELECT oid, FROM pgxc_node;oid | node_name | node_type | node_port | node_host | nodeis_primary | nodeis_preferred | node_id -------+-----------+-----------+-----------+-----------+----------------+------------------+-------------11819 | coord1 | C | 5432 | datanode1 | f | f | 188569664316384 | coord2 | C | 5432 | datanode2 | f | f | -119710263316385 | node1 | D | 5433 | datanode1 | f | t | 114854923016386 | node2 | D | 5433 | datanode2 | f | f | -92791069016397 | dn3 | D | 5430 | datanode1 | f | f | -700122826(5 rows) 2.查询dn3对应的oid中是否有数据 testdb= SELECT FROM pgxc_class WHERE nodeoids::integer[] @> ARRAY[16397];pcrelid | pclocatortype | pcattnum | pchashalgorithm | pchashbuckets | nodeoids ---------+---------------+----------+-----------------+---------------+-------------------16388 | H | 1 | 1 | 4096 | 16397 16385 1638616394 | R | 0 | 0 | 0 | 16397 16385 16386(2 rows) 3.有数据的先回收数据 postgres= ALTER TABLE disttab DELETE NODE (dn3);ALTER TABLEpostgres= ALTER TABLE repltab DELETE NODE (dn3);ALTER TABLEpostgres= SELECT FROM pgxc_class WHERE nodeoids::integer[] @> ARRAY[16397];pcrelid | pclocatortype | pcattnum | pchashalgorithm | pchashbuckets | nodeoids ---------+---------------+----------+-----------------+---------------+----------(0 rows) 4.安全删除dn3 PGXC$ remove datanode master dn3 clean 故障节点FAILOVER 1.查看当前集群状态 [postgres@gtm ~]$ psql -h xl1 -p 5432psql (PGXL 10r1.1, based on PG 10.6 (Postgres-XL 10r1.1))Type "help" for help.postgres= SELECT oid, FROM pgxc_node;oid | node_name | node_type | node_port | node_host | nodeis_primary | nodeis_preferred | node_id-------+-----------+-----------+-----------+-----------+----------------+------------------+-------------11739 | coord1 | C | 5432 | xl1 | f | f | 188569664316384 | coord2 | C | 5432 | xl2 | f | f | -119710263316387 | datanode2 | D | 15432 | xl2 | f | f | -90583192516388 | datanode1 | D | 15432 | xl1 | t | t | 888802358(4 rows) 2.模拟datanode1节点故障 直接关闭即可 PGXC stop -m immediate datanode master datanode1Stopping datanode master datanode1.Done. 3.测试查询 只要查询涉及到datanode1上的数据,那么该查询就会报错 postgres= SELECT xc_node_id, count() FROM disttab GROUP BY xc_node_id;WARNING: failed to receive file descriptors for connectionsERROR: Failed to get pooled connectionsHINT: This may happen because one or more nodes are currently unreachable, either because of node or network failure.Its also possible that the target node may have hit the connection limit or the pooler is configured with low connections.Please check if all nodes are running fine and also review max_connections and max_pool_size configuration parameterspostgres= SELECT xc_node_id, FROM disttab WHERE col1 = 3;xc_node_id | col1 | col2 | col3------------+------+------+-------905831925 | 3 | 103 | foo(1 row) 测试发现,查询范围如果涉及到故障的node1节点,会报错,而查询的数据范围不在node1上的话,仍然可以查询。 4.手动切换 要想切换,必须要提前配置slave节点。 PGXC$ failover datanode node1 切换完成后,查询集群 postgres= SELECT oid, FROM pgxc_node;oid | node_name | node_type | node_port | node_host | nodeis_primary | nodeis_preferred | node_id -------+-----------+-----------+-----------+-----------+----------------+------------------+-------------11819 | coord1 | C | 5432 | datanode1 | f | f | 188569664316384 | coord2 | C | 5432 | datanode2 | f | f | -119710263316386 | node2 | D | 15432 | datanode2 | f | f | -92791069016385 | node1 | D | 15433 | datanode2 | f | t | 1148549230(4 rows) 发现datanode1节点的ip和端口都已经替换为配置的slave了。 本篇文章为转载内容。原文链接:https://blog.csdn.net/qianglei6077/article/details/94379331。 该文由互联网用户投稿提供,文中观点代表作者本人意见,并不代表本站的立场。 作为信息平台,本站仅提供文章转载服务,并不拥有其所有权,也不对文章内容的真实性、准确性和合法性承担责任。 如发现本文存在侵权、违法、违规或事实不符的情况,请及时联系我们,我们将第一时间进行核实并删除相应内容。
2023-01-30 11:09:03
94
转载
建站模板下载
...模板是一款专为苹果设备用户提供刷机指南与应用程式下载服务的响应式网页模板。采用HTML5技术构建,设计风格简洁明快,完美适配各类屏幕尺寸。该模板以“苹果刷机助手”为核心功能展示,提供详尽的刷机教程、APP推荐及更多相关资源,方便用户高效安全地进行设备管理与系统升级操作。" 点我下载 文件大小:456.44 KB 您将下载一个资源包,该资源包内部文件的目录结构如下: 本网站提供模板下载功能,旨在帮助广大用户在工作学习中提升效率、节约时间。 本网站的下载内容来自于互联网。如您发现任何侵犯您权益的内容,请立即告知我们,我们将迅速响应并删除相关内容。 免责声明:站内所有资源仅供个人学习研究及参考之用,严禁将这些资源应用于商业场景。 若擅自商用导致的一切后果,由使用者承担责任。
2023-05-27 08:38:30
95
本站
建站模板下载
...感,适用于展示云计算服务、服务器解决方案的公司官网。页面宽屏设计大气且信息丰富,能够全面呈现企业产品特点与优势,助力提升品牌形象和客户体验。 点我下载 文件大小:789.08 KB 您将下载一个资源包,该资源包内部文件的目录结构如下: 本网站提供模板下载功能,旨在帮助广大用户在工作学习中提升效率、节约时间。 本网站的下载内容来自于互联网。如您发现任何侵犯您权益的内容,请立即告知我们,我们将迅速响应并删除相关内容。 免责声明:站内所有资源仅供个人学习研究及参考之用,严禁将这些资源应用于商业场景。 若擅自商用导致的一切后果,由使用者承担责任。
2023-01-24 10:05:48
108
本站
建站模板下载
..."绿色经典响应式主机服务器托管网站模板是一款基于HTML5技术设计的静态网页模板,专为云主机与服务器托管企业打造。该模板采用清新绿色调,呈现经典且专业的界面风格,同时具备响应式布局,能在不同设备上自动适应,确保卓越的浏览体验。此模板适用于展示托管服务详情、企业信息及更多业务内容,是快速构建高质感托管行业网站的理想之选。" 点我下载 文件大小:2.71 MB 您将下载一个资源包,该资源包内部文件的目录结构如下: 本网站提供模板下载功能,旨在帮助广大用户在工作学习中提升效率、节约时间。 本网站的下载内容来自于互联网。如您发现任何侵犯您权益的内容,请立即告知我们,我们将迅速响应并删除相关内容。 免责声明:站内所有资源仅供个人学习研究及参考之用,严禁将这些资源应用于商业场景。 若擅自商用导致的一切后果,由使用者承担责任。
2023-04-25 18:17:08
288
本站
建站模板下载
资源介绍 这款响应式服务器共享托管公司网站html模板专为网络托管服务企业设计,采用自适应布局,确保在不同设备上都能完美展示。模板以展现服务器租用、虚拟主机等核心业务为主,具备清晰的服务栏目和丰富的功能模块,助力企业展示其专业且全面的托管解决方案。通过精美的网页设计与高度定制化能力,该模板旨在吸引更多潜在客户,提升公司在服务器共享及托管行业的品牌形象与市场竞争力。 点我下载 文件大小:7.81 MB 您将下载一个资源包,该资源包内部文件的目录结构如下: 本网站提供模板下载功能,旨在帮助广大用户在工作学习中提升效率、节约时间。 本网站的下载内容来自于互联网。如您发现任何侵犯您权益的内容,请立即告知我们,我们将迅速响应并删除相关内容。 免责声明:站内所有资源仅供个人学习研究及参考之用,严禁将这些资源应用于商业场景。 若擅自商用导致的一切后果,由使用者承担责任。
2023-08-20 18:13:53
64
本站
建站模板下载
...上营销活动。其强大的服务器端支持确保了网站的高效稳定运行,是构建现代化软件营销公司官网的理想选择。 点我下载 文件大小:1.45 MB 您将下载一个资源包,该资源包内部文件的目录结构如下: 本网站提供模板下载功能,旨在帮助广大用户在工作学习中提升效率、节约时间。 本网站的下载内容来自于互联网。如您发现任何侵犯您权益的内容,请立即告知我们,我们将迅速响应并删除相关内容。 免责声明:站内所有资源仅供个人学习研究及参考之用,严禁将这些资源应用于商业场景。 若擅自商用导致的一切后果,由使用者承担责任。
2023-01-06 21:54:03
269
本站
建站模板下载
...“自适应网络云端托管服务公司网站静态模板”是一款基于HTML5技术的企业级响应式网页设计,专为网络服务公司打造。该模板涵盖了网络安全、虚拟主机、服务器租赁和云端托管等业务领域,拥有灵活的布局结构,可自动适应不同设备屏幕尺寸,确保PC端与移动端浏览体验一致。模板设计现代专业,凸显企业品牌形象,方便用户快速搭建并展示产品与服务信息,是推广网络服务及解决方案的理想选择。 点我下载 文件大小:1.38 MB 您将下载一个资源包,该资源包内部文件的目录结构如下: 本网站提供模板下载功能,旨在帮助广大用户在工作学习中提升效率、节约时间。 本网站的下载内容来自于互联网。如您发现任何侵犯您权益的内容,请立即告知我们,我们将迅速响应并删除相关内容。 免责声明:站内所有资源仅供个人学习研究及参考之用,严禁将这些资源应用于商业场景。 若擅自商用导致的一切后果,由使用者承担责任。
2023-06-02 13:32:44
106
本站
JQuery插件下载
...该插件致力于在图片从服务器加载至浏览器的过程中,为用户提供视觉上的加载进度反馈,以增加交互性和用户感知度。其核心功能在于,当图片资源请求时,会在原图片位置显示一个垂直渐进式的加载动画效果,使得页面元素的加载过程更为生动且具有吸引力。使用这款插件可以有效避免因图片加载延迟导致的页面布局抖动问题,同时也提升了用户体验,让用户在等待图片完全加载的同时能够明确感知到加载进程正在进行中。插件实现方式简洁易用,只需简单的配置和调用即可将原本静态的图片加载过程转变为炫酷的动画展示,是现代Web开发中优化加载性能、美化页面过渡效果的理想工具之一。 点我下载 文件大小:196.59 KB 您将下载一个JQuery插件资源包,该资源包内部文件的目录结构如下: 本网站提供JQuery插件下载功能,旨在帮助广大用户在工作学习中提升效率、节约时间。 本网站的下载内容来自于互联网。如您发现任何侵犯您权益的内容,请立即告知我们,我们将迅速响应并删除相关内容。 免责声明:站内所有资源仅供个人学习研究及参考之用,严禁将这些资源应用于商业场景。 若擅自商用导致的一切后果,由使用者承担责任。
2023-11-12 11:51:41
91
本站
站内搜索
用于搜索本网站内部文章,支持栏目切换。
知识学习
实践的时候请根据实际情况谨慎操作。
随机学习一条linux命令:
watch -n 5 'command'
- 定时执行命令并刷新输出结果(每5秒一次)。
推荐内容
推荐本栏目内的其它文章,看看还有哪些文章让你感兴趣。
2023-04-28
2023-08-09
2023-06-18
2023-04-14
2023-02-18
2023-04-17
2024-01-11
2023-10-03
2023-09-09
2023-06-13
2023-08-07
2023-03-11
历史内容
快速导航到对应月份的历史文章列表。
随便看看
拉到页底了吧,随便看看还有哪些文章你可能感兴趣。
时光飞逝
"流光容易把人抛,红了樱桃,绿了芭蕉。"