当前位置:网站首页>热部署和热加载有什么区别?
热部署和热加载有什么区别?
2022-07-25 23:24:00 【逍遥壮士】
热部署和热加载是什么?
热部署是什么?
热部署全称Hot deploy,主要是针对容器或应用,若新增资源或部分源码更新,在不需要重启的情况下进行重新加载或部署。
热加载是什么?
热加载全称Hot Swap,主要针对已编译的源码生成的字节码,重新编译后,不需要停机,直接重新加载该更新后文件新的字节码到内存中。
个人理解:热部署和热更新主要是解决频繁重启服务的导致体验和效率不佳。热部署可以从0-1,或从1-1,比如 买来的方便面在家里直接泡个开水开吃,或者直接排骨熬汤上。热加载就很有限了,就像你在高铁上条件有限,仅能加开水开干。
热部署和热加载对比
对比名称 | 热部署 | 热加载 |
需要重启 | 不需要 | 不需要 |
对针面 | 整个应用或容器,新增或减少的文件、文件夹 | 局部(针对变动的源码) |
内存清除 | 会 | 不会,可能引发OOM |
最后
不管理热部署和热加载,其实最终目的是无需要重启服务,实现服务自动化加载,只是说热部署更全面,针对的是整个项目,而热加载仅针对变更的文件代码做局部更新,对于新文件或目录无效,需要重部署。当然对于java语言来说,热加载属于比较成熟的技术,而对于tomcat来说热部署也是比较方法,直接把文件丢进webapp自动就部署上了。在不同的场景会有不同的使用。像ideea、vscode很多ide都会实现热部署的功能,所以在开发层面极大提升我们研发的效率。
参考文章:
https://blog.51cto.com/u_11103019/3766234
https://www.cnblogs.com/lanqingzhou/p/13590334.html
https://www.cnblogs.com/diexian/p/13501359.html
https://blog.51cto.com/u_13567403/3043758
https://blog.csdn.net/zhanglh046/article/details/115843463
边栏推荐
- Take away applet with main version of traffic / repair to add main access function of traffic
- [QNX Hypervisor 2.2用户手册]9.8 load
- CSV generated by PHP cannot completely display the number with leading 0
- Strategy mode_
- Custom MVC principle
- [QNX Hypervisor 2.2用户手册]9.7 generate
- Node基础
- 【代码案例】博客页面设计(附完整源码)
- Redis expiration key deletion strategy [easy to understand]
- 【MUDUO】Thread封装
猜你喜欢

serialization and deserialization

类和对象(3)

Custom MVC principle

Multimodal deep multi modal sets

Inheritance (the child constructor inherits the attributes in the parent constructor)

Query commodity cases (operate data with array addition method) / key points

WebMvcConfigurationSupport

XXE&XML-外部实体注入-利用和绕过

Secure code warrior learning record (III)

Idea sets get and set templates to solve the naming problem of boolean type fields
随机推荐
【MUDUO】EventLoopThreadPool
Redis expiration key deletion strategy [easy to understand]
Take away applet with main version of traffic / repair to add main access function of traffic
initializer_list工具库学习
CTS test method "suggestions collection"
PHP JSON variable array problem
How to set pseudo static for WordPress fixed links
Overview of MES system equipment management (Part 2)
idea设置get、set模板解决boolean类型字段的命名问题
Mongodb query and projection operators
电商RPA,大促轻松上阵的法宝
JS get the current date and time
推荐系统——An Embedding Learning Framework for Numerical Features in CTR Prediction
XXE&XML-外部实体注入-利用和绕过
TS interface
2022 Niuke multi School Game 2
About using NPM command under the terminal, the installation error problem is solved (my own experience)
VisualBox启动虚拟机报错:The VM session was closed before any attempt to power it on.
[wechat applet] page navigation
WordPress function encyclopedia, you can do the theme after learning it