samedi 23 mars 2019

When splitting 1 service into multiple services, do the configurations for the service need split and each part stored in the services?

Let's say you have a "monolith" with a set of configurations

{
    id: 1273,
    fooConfig: { .. },
    barConfig: { .. },
    bazConfig: { ...}
}

and you want to split it into Foo, Bar and Baz services which run jobs when asked to by a central workflow engine.

Do you need to store each of the configurations in the services, like

// Foo service config (stored in Foo service)
{
   id: 1273,
   .
   .  // fooConfig stuff
   .
} 

// Bar service config (stored in Bar service)
{
   id: 1273,
   .
   .  // barConfig stuff
   .
} 

// Baz service config (stored in Baz service)
{
   id: 1273,
   .
   .  // bazConfig stuff
   .
} 

or can you store the configuration in some other service (say Configuration Manager service) and input the respective parts of it into the 3 job services when they are invoked?

Aucun commentaire:

Enregistrer un commentaire