All threads / Rails micro-services and authentication domain to use with devise

Ask A Question


You’re not receiving notifications from this thread.

Rails micro-services and authentication domain to use with devise

Alexey Poimtsev asked in Rails

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?

Join the discussion

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

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

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

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2021 GoRails, LLC. All rights reserved.