检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
作 者:宋恒嘉 陈洁 仲伟炜 SONG Hengjia;CHEN Jie;ZHONG Weiwei(Bozhi Safety Technology Co.,Ltd,Nanjing,China,210000)
出 处:《福建电脑》2022年第6期56-58,共3页Journal of Fujian Computer
摘 要:微服务化改造后,同一套代码在内存充足的集群环境下可以完美运行,但在单机环境下可能会存在内存占用过高的问题。为了解决这种问题,一般采取调整jvm参数的方式进行应对。但是jvm有最低的参数要求,为此可能需要重新编写代码适配内存不足的硬件环境。本文阐述了一种全新的在编译打包时动态合并微服务、动态去除注册中心的方法,用于解决在单机环境下JDK内存占用过高的问题。该方法解决了同一套代码既可以在集群化环境下运行,也可以在内存不足的环境下运行的的问题,在保证功能正常的前提下,将业务中台4个微服务在打包时动态合并为2个微服务,在单机环境下将3G内存占用优化到1.1G左右。After the microservice transformation,the same set of code can run perfectly in the cluster environment with sufficient memory,but the memory may be too high in the single machine environment,In order to solve this problem,we may first adjust the JVM parameters,but the JVM has the lowest parameter requirements.Therefore,we may need to rewrite the code to adapt to the hardware environment with insufficient memory.This paper describes a new method of dynamically merging micro services and dynamically removing the registry center when compiling and packaging.This method solves the problem that the same set of code can run both in the clustered environment and in the environment with insufficient memory.On the premise of ensuring the normal function,four microservices in the service are dynamically combined into two microservices,and the 3G memory is optimized to about 1.1G in the single machine environment.
分 类 号:TP39[自动化与计算机技术—计算机应用技术]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:216.73.216.171