Skip to content

[Proposal] A lightweight version of Apollo #4729

@nobodyiam

Description

@nobodyiam

Apollo is designed based on the microservice pattern. As shown in the diagram below, it consists of several logical components:

  1. Portal
  2. Config Service
  3. Admin Service
  4. Eureka(embedded in config service)
  5. PortalDB and ConfigDB

Architecture Module

This architecture provides very good scalability for medium and large use cases. However, it brings resource cost and operational burden, which is not friendly for small use cases.

Therefore, I think it's better to reduce the architecture complexity and provide a lightweight verision of Apollo.

Below are some potential areas that might help.

  1. Package the portal, config service and admin service into one assembly
    The idea is to make this assembly configurable, e.g. it can run as an all-in-one mode which serves the role of portal, config service and admin service together. Or it could also run as a standalone role, e.g. config service.
    With this feature, small team or quick start scenario could use the all-in-one mode to reduce resource comsuption and operational burden. But large company could still keep the distributed capability to maintain scalability.
    Currently apollo-assembly is used to run the config service and admin service together, so it could be used as a baseline to support portal too.

  2. Support in-memory database
    Mysql is a simple and easy to use database, however, it still adds some burden for quick start scenarios.
    I think we could add official support for in-memory database so that users can simple download and run the assembly with no extra cost.
    Currently the h2 database is used in integration test scenarios, which might be a good start.

  3. Use database as the default service discovery
    Eureka is now the default service discovery. However, since some users are not familiar with its replication mechanism, it's difficult for them to configure it properly.
    As 2.1.0 introduced the database-discovery feature, which is simple and easy to understand, so I think we could use it as the default service discovery instead.

Since this proposal may bring major architectural changes to Apollo, I think we could keep this discussion open for a while to receive more suggestions and ideas.

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionCategorizes issue as related to discussion

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions