Refer to 37signals -- they are experts in this field and have a lot of articles where they answer community questions (many like yours should come up).
High Scalability = 37signals Architecture
Ask 37signals: How do you process credit cards?
In regards to number of databases, from David Heinemeier Hansson in What do you want to know?
Some technical answers…
Lance, all our scheduled billing
operations are automated. Anything
sort of that would drive us insane.
It’s especially important to make sure
that contingency handling is in place
for failing credit cards. Last I
looked, I believe 5% of our charges
bounced thanks to credit cards that
were expired, over the limit, or
closed. Be sure to handle that
gracefully.
We just use Authorize.net and a
separate credit card application (tiny
app developed in Rails and used by the
other apps on the internal network
through REST ) that keeps numbers
secure.
Warren, we run free and pay accounts
on the same database. It’s one
database per application. One database
per account is normally a really,
really bad idea. Usually the data is
fairly normalized, but we’re
definitely not religious about it. I
generally value my source code over my
schema. So if I can get
better/prettier source code by bending
a schema, I’ll typically do that. But
start from normalized and denormalize
as performance or code structure
demands it.
Jason, we use email for sms. All US
carriers have a
[email protected] gateway.
Jake Good, ahh, the good ol’ “but does
it scale” question. I answered that on
a couple of years back. Nothing has
changed for us since then. We manage
millions and millions of dynamic
requests every day without even
resorting to much caching (most
screens in most of our applications
are different on a per-user basis, so
traditional caching schemes are harder
to apply).
There are many other Rails
applications out there managing tens
of millions of daily requests. All
follow more or less the same Shared
Nothing approach. All the techniques
for scaling high and tall are out
there. It’s hardly a turn-key
solution, but anything that promises
to be that is usually just full of it.