简体   繁体   English

创建 Spring Cloud 微服务

[英]Creating a Spring Cloud microservice

I am trying to learn and create a microservice using Spring Cloud.我正在尝试使用 Spring Cloud 学习和创建微服务。 I am using Spring mvc and Spring Boot for development.我正在使用 Spring mvc 和 Spring Boot 进行开发。 I added separate Spring Boot application for both Eureka server and Zuul client.我为 Eureka 服务器和 Zuul 客户端添加了单独的 Spring Boot 应用程序。 I have three Spring Boot application now.我现在有三个 Spring Boot 应用程序。 One Sureka server, one for Zuul routing and third one is for my microservice application.一台 Sureka 服务器,一台用于 Zuul 路由,第三台用于我的微服务应用程序。 I run the Eureka server and the microservice and Zuul found to be running properly in Eureka server UI.我运行了 Eureka 服务器,发现微服务和 Zuul 在 Eureka 服务器 UI 中运行正常。

  • My doubt is that, I am planned to use routing and service discovery in my microservice.我的疑问是,我计划在我的微服务中使用路由和服务发现。 So I have a total of three Spring Boot applications.所以我总共有三个 Spring Boot 应用程序。 Can I deploy these three applications into AWS Elastic Beanstalk?我可以将这三个应用程序部署到 AWS Elastic Beanstalk 中吗?
  • When I exploring I found that Pivotal Cloud Foundry topic.当我探索时,我发现了 Pivotal Cloud Foundry 主题。 Since I am planing to use AWS Elastic Beanstalk.因为我打算使用 AWS Elastic Beanstalk。 So what is the role of Pivotal Cloud Foundry in my application?那么 Pivotal Cloud Foundry 在我的应用程序中的作用是什么?

I am still confused about microservice development using Spring Cloud.我仍然对使用 Spring Cloud 进行微服务开发感到困惑。

So there are two elements in your confusion.所以你的困惑有两个要素。 Is Amazon Beanstalk suitable? Amazon Beanstalk 是否合适? So answer is yes.所以答案是肯定的。 but you have overhead of orchestrating various services of amazon over then.但是那时你有编排亚马逊各种服务的开销。 Basically Amazon Elastic Beanstalk is more form based which means you need to tell what exactly you want to do with application for example route setup , scaling mechanism , application portability, application health management , Integration with external log aggregators etc. This is big learning curve to many people (including me :) ).基本上,Amazon Elastic Beanstalk 更基于形式,这意味着您需要明确您想对应用程序做什么,例如路由设置、扩展机制、应用程序可移植性、应用程序健康管理、与外部日志聚合器的集成等。这是一个很大的学习曲线很多人(包括我:))。 Where as these with PCF these things are easy and straightforward and sometimes implicitly done.PCF 一样,这些事情简单又直接,有时甚至隐含地完成。 Now Can I use pivotal cloud foundry with amazon?现在我可以在亚马逊上使用关键的云代工厂吗? answer will be absolutely yes.答案是肯定的。

Pivotal cloud foundry is Wrapper written over open source Cloud Foundry project. Pivotal cloud Foundry 是基于开源 Cloud Foundry 项目编写的 Wrapper。 It is more succinct PaaS option than Amazon Beanstalk.它是比 Amazon Beanstalk 更简洁的 PaaS 选项。 You can host PCF on amazon ec2 ( IaaS )boxes using BOSH software.您可以使用 BOSH 软件在 amazon ec2 ( IaaS ) 机器上托管 PCF。 To answer you PCF is a alternative to Amazon Beanstalk.为了回答您,PCF 是 Amazon Beanstalk 的替代品。 You don't need PCF is you want to use Amazon Beanstalk and vice versa.如果您想使用 Amazon Beanstalk,则不需要 PCF,反之亦然。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 仅在弹簧云微服务实例中使用https - Using https only with spring cloud microservice instances Spring 在 Google Cloud 上启动微服务部署问题 - Spring Boot Microservice Deployment issue on Google Cloud 春季云流-MicroService可以同时提供源和接收器 - spring cloud stream - Can a MicroService a source and a sink at the same time Spring Cloud - 如何仅允许访问特定微服务的端点? - Spring Cloud - how to allow access to endpoint for specific microservice only? 一个微服务网络中对Spring Cloud项目的依赖关系版本 - Version of dependencies to Spring Cloud projects in one microservice network 使用Spring Cloud配置运行多实例微服务 - Running multiple instance microservice using spring cloud config 使用微服务 AppRole 到 Spring 云配置服务器和 Vault 集成 - Using Microservice AppRole to Spring Cloud Config Server and Vault integration 微服务不从 spring-cloud-config-server 微服务中获取属性 - microservice doesn't fetch properties from spring-cloud-config-server microservice Spring Cloud微服务,与其他微服务一起使用密码保护的微服务 - Spring Cloud microservice, consume password protected micro service with other micro service 使用Spring-Cloud-Sleuth时,在进行微服务调用时是否可以免费获取parentSpanID? - When using Spring-Cloud-Sleuth, are we getting parentSpanID for free when doing across microservice calls?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM