Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4039616
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T12:38:18+00:00 2026-05-20T12:38:18+00:00

I am using Ruby on Rails 3 and I would like to handle user

  • 0

I am using Ruby on Rails 3 and I would like to handle user authentications in a Service-Oriented Architecture (SOA).

At this time I have 3 applications located (for now) on the same server:

  • pjtname.com
  • users.pjtname.com
  • others.pjtname.com

I would like to use memcached (it is a very awesome way to avoid to query the database), but I’ve heard of problems that can happen when the system goes out of memory, such as the problem for users not being able to log.

However, I am thinking to store in the pjtname.com cache at least the user_id values so that is more hard to go out of memory. The following are steps at what I am thinking to do, but I don’t know if it is the best way to accomplish what I aim.

  1. send user credentials from pjtname.com to users.pjtname.com over SSL;
  2. on the users.pjtname.com side use a middleware to intercept and sign in the user;
  3. on sign in success, send back the user session authentication information (example: the user_id string) from users.pjtname.com to pjtname.com over SSL;
  4. on the pjtname.com side look for user_id in cache and if that is expired start again at the step 1.

So, do you advice to use memcached for that purpose?

  • If so, where I can start?
  • If no, what approach is recommended?

UPDATE for @Mörre comment

Why do you want to send authentication
info between the sites, can’t they
just get the session data from the
(same) database?

It is because I am trying to scale RoR applications on different servers each of them with its own database.

To give architecture advice one would
have to see the WHOLE picture, what
your task is from the customers point
of view, and know their intentions and
constraints.

The “picture” is that I have 3 RoR applications (pjtname.com, users.pjtname.com and others.pjtname.com) for which I need to handle data in order to improve the whole system performance. In this case I need to handle user session on a central place (pjtname.com) in order to access to the other application datas (users.pjtname.com and others.pjtname.com) only if the current user is authenticated, that is, signed in.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T12:38:18+00:00Added an answer on May 20, 2026 at 12:38 pm

    Given what you’ve explained so far, my answer would be no, I would not recommend this. Use a before_filter to authenticate, store the auth in the session.

    Now if you had asked if you can use memcached as a session store, I’d say that it is possible. But the overly-complex message-passing scenario you’ve described would not be helped by using memcached.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to create something like this using ruby on rails. Im not
I am using Ruby on Rails 3 and I would like to handle properly
I have been using ActiveResource in my Ruby on Rails applications for some time,
I am building web applications using Ruby on Rails and I would like to
I am using Ruby on Rails 3 and I would like to know what
I am using Ruby on Rails 3 and I would like to map JSON
I am using Ruby on Rails and I would like to make HTTP requests
I am using Ruby on Rails 3 and I would like to set some
I am using Ruby on Rails 3 and I would like to know some
I am using Ruby on Rails 3 and I would like to start to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.