rubycas / rubycas-server

Provides single sign-on authentication for web applications, implementing the server-end of Jasig's CAS protocol.
http://rubycas.github.com
Other
628 stars 270 forks source link

Rubycas runs in a performance issue on high-load systems #115

Closed coding-bunny closed 11 years ago

coding-bunny commented 12 years ago

Hello,

Yesterday we ran into problems with the Rubycas server on one of our high-load systems. The problem turned out to be missing indexes on the tables generated by CAS, causing latencies up to 50s when dealing up to 100 concurrent requests in sequence.

We solved this by adding indexes. I would like to push these changes back to the project to prevent other people from having this:

class CreateIndexes < ActiveRecord::Migration
def self.up
    add_index :casserver_pgt, :ticket
    add_index :casserver_st,  :ticket
    add_index :casserver_lt,  :ticket
    add_index :casserver_tgt, :ticket
end

def self.down
    remove_index  :casserver_pgt, :ticket
    remove_index  :casserver_st,  :ticket
    remove_index  :casserver_lt,  :ticket
    remove_index  :casserver_tgt, :ticket
end
end
adamcrown commented 11 years ago

Seems like this should be closed now that https://github.com/rubycas/rubycas-server/pull/116 has been merged.