Question

Can we deploy SOA/Microservices Architecture to App Platform ?

Hello,

I was wondering if we could deploy multiple microservices as “workers” and one API-gateway as “service”.

  • Did my API-gateway can communicate to my microservices through TCP/HTTP protocol if they are “workers” ? If it’s the case, how ?
  • Or did I have to declare all my microservices as “services” but they will became available to the public internet, so the API-gateway is no longer the source of truth, each microservices have to check authentication if they are publicly accessible. Is it possible to declare a “service” as private-only ?

Thanks,

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

Hello, “internal services” are possible using internal_ports property in the app spec and without http_port property.

name: sample-golang
services:
- name: intsvc1
  github:
    repo: digitalocean/sample-golang
    branch: master
  internal_ports:
  - 3000

The internal service should be addressable with just the component name.

Does it still work? I’ve got the following error while validating my app spec using doctl command line tool:

❯ doctl apps spec validate .do/app.yaml  -v
Error: Failed to parse app spec: json: unknown field "internal_ports"

This comment has been deleted