Ask A Question

Notifications

You’re not receiving notifications from this thread.

Rails micro-services and authentication domain to use with devise

Alexey Poimtsev asked in Rails

Hi!
I'd like to split my rails application to microservices, such as

  • main app 1
  • main app 2
  • main app N
  • authentication and account management
  • administration console
  • marketing console (blazer & ahoy)
  • etc

As a reference - Spotify, Google, etc. All of them have a separate domain for authentication, so I'd like to ask you about best practices on how to organize application architecture

1 - how to navigate users from main apps, admin and marketing console to the authentication domain using devise? Should I use doorkeeper or ruby-cas or is there a better solution?
2 - should I store all data in one database and use database prefixes for main-app's (something like main_app1_comments or main_app_3_likes) or is it better to store data in separate databases?
3 - should I store users on in main database (which will contain authentication data, roles, stats, etc) or should i store users in their own databases and just replicate data from main database?

Any ideas?

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 86,796+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.