api - Should I make a service for shared Docker dependencies? -


i have 3 different services uses graphicsmagick dependency , i'm starting docker. i'm wondering, should make separate light api graphicsmagick (maybe using php) , put in separate docker container? since graphicsmagick executable.

or slow , best way install graphicsmagick dependency each service container?

thanks!

as mentioned in comments , original question, there 2 approaches here. 1 install graphicsmagick in base image or in individual service images. other build separate service (a sort of worker or image manipulation api of sorts) specific graphicsmagick. guess answer depend on pros , cons important right now.

graphicsmagick in base image has advantages easy implement. don't have build extra. graphicsmagick binary shouldn't hassle install , adds couple mb size end resulting images.

building separate api service image graphicsmagick has overhead of development time , service complexity. you'd need implement sort of service discovery model other service images know how new api. though, down road more scalable model. depending on load is, can scale separately of other service containers, , run on separate hosts if desired, when image manipulations can use cpu , starve other services.

so ask these questions:

  • can afford additional development time?
  • does application need separate scalability?
  • is there no issue managing additional service might need service discovery?

if can answer yes questions, might in line build out separate service this. docker lends service oriented architectures , more proper way build out application. lot can said "just works" , takes minimal time implement now, if work fine amount of time.


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -