如何使用JAVA在没有云的情况下在本地服务器中自动扩展微服务 [英] How to Auto Scale Microservices in Local server without cloud using JAVA

查看:180
本文介绍了如何使用JAVA在没有云的情况下在本地服务器中自动扩展微服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是微服务的新手.我创建了spring boot(maven)微服务(2个服务,1个网关和服务注册表).我如何在没有云技术的情况下扩展(自动扩展)2个服务.在本地配置中可以吗?

Hi I am new to the microservices. I have created spring boot(maven) microservices (2 services, 1 gateway and service registry). How can I scale (auto scaling) 2 services without cloud technology. Is it possible in the local configuration?

推荐答案

我使用 Docker群集这为我提供了一个类似云的环境,在这里我可以非常轻松地升级或缩减服务.

I use Docker swarm and this gives me a cloud-like environment where I can upscale or downscale a service very easily.

您可以在此处阅读有关使用带有Spring Boot的Docker 的信息.还有此文章.

You can read here about using Docker with Spring Boot. There is also this article.

P.S. Docker和Docker swarm是免费的或免费的(社区版本).

P.S. Docker and Docker swarm are free or charge (the community editions).

这篇关于如何使用JAVA在没有云的情况下在本地服务器中自动扩展微服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆