分布式理论
1.分布式一致性协议1.1二阶段提交协议(2pc)2preparecommit,先执行事务,但不提交,待所有执行者都确认可以提交事务再一起提交,若有一个失败则回滚:!image.png(https://imghelloworld.osscnbeijing.
1.分布式一致性协议1.1二阶段提交协议(2pc)2preparecommit,先执行事务,但不提交,待所有执行者都确认可以提交事务再一起提交,若有一个失败则回滚:!image.png(https://imghelloworld.osscnbeijing.
原文链接(https://link.segmentfault.com/?encfBHv%2BZXyjuTQuB8PxbzJ%2Fw%3D%3D.DLxdimo7VxqNifg0yPLiJmY1kowWoB2%2BbeiYgPS6JyNZnBc3TR7Sn2J3xJ5T7ARa)nlohm
<pre<code//http.js//引入内置http模块varhttprequire(&34;http&34;)//创建服务器varserverhttp.createServer(function(req,res){////设置响应状态码,响应头(