Entries by HighScalability Team (1576)

Tuesday
Aug142012

MemSQL Architecture - The Fast (MVCC, InMem, LockFree, CodeGen) and Familiar (SQL)

This is an interview with MemSQL cofounder’s Eric Frenkiel and Nikita Shamgunov, in which they try to answer critics by going into more depth about their technology.

MemSQL ruffled a few feathers with their claim of being the fastest database in the world. According to their benchmarks MemSQL can execute 200K TPS on an EC2 Quadruple Extra Large and on a 64 core machine they can push 1.2 million transactions a second.

Benchmarks are always a dark mirror, so make of them what you will, but the target market for MemSQL is clear: projects looking for something both fast and familiar. Fast as in a novel design using a combination of technologies like MVCC, code generation, lock-free data structures, skip lists, and in-memory execution. Familiar as in SQL and nothing but SQL. The only interface to MemSQL is SQL.

It’s right to point out MemSQL gets a boost by being a first release. Only a limited subset of SQL is supported, neither replication or sharding are implemented yet, and writes queue in memory before flushing to disk. The next release will include a baseline distributed system, native replication, n-way joins, and subqueries. Maintaining performance as more features are added is a truer test.

And MemSQL is RAM based, so of course it’s fast, right? Even among in-memory databases MemSQL hopes to convince you they’ve made some compelling design choices. The reasoning for their design goes something like:

Click to read more ...

Monday
Aug132012

Ask HighScalability: Facing scaling issues with news feeds on Redis. Any advice?

We just released a social section to our iOS app several days ago and we are already facing scaling issues with the users' news feeds.

We're basically using a Fan-out-on-write (push) model for the users' news feeds (posts of people and topics they follow) and we're using Redis for this (backend is Rails on Heroku).  However, our current 60,000 news feeds is ballooning our Redis store to almost 1GB in a just a few days (it's growing way too fast for our budget). Currently we're storing the entire news feed for the user (post id, post text, author, icon url, etc) and we cap the entries to 300 per feed.

I'm wondering if we need to just store the post IDs of each user feed in Redis and then store the rest of the post information somewhere else?  Would love some feedback here.  In this case, our iOS app would make an api call to our Rails app to retrieve a user's news feed.  Rails app would retrieve news feed list (just post IDs) from Redis, and then Rails app would need to query to get the rest of the info for each post.  Should we query our Postgres DB directly?  But that will be a lot of calls to our DB.  Should we create another Redis store (so at least it's in memory) where we store all of the posts from our DB and we query this to get the post information?  Or should we forget Redis and go with MongoDB or Cassandra so we can have higher storage limits?

Thanks for your help in advance.

Friday
Aug102012

Stuff The Internet Says On Scalability For August 10, 2012

It's HighScalability Time:

  • TNW: On an average day, out of 30 trillion URLs on the web, Google crawls 20B web pages and now serves 100B searches every month.
  • Quotable Quotes:
    • @tapbot_paul: The 2 computers on the Curiosity rover are RAD750 based, they are approximately 1/10th the speed of an iPhone 4s and “only” cost $200k each.
    • @merv: #cassandra12 Why @adrianco loves what he's doing: "You are no longer IO-bound, you’re CPU bound, like you’re supposed to be."
    • @maxtaco: Garbage collection solves a minuscule %age of bugs, that are non-critical (memleaks? big deal!) and easy to find and fix. At a HUGE expense.
    • @merv: #cassandra12 @eddie_satterly describing $1M savings in first year migrating from MS SQL Server with SAN to Cassandra solution - w more data.
    • @mattbrauchler: A slow node is worse than a down node #cassandra12
    • @practicingEA: "The math of predictive analytics has been around for years, its the computers that have caught up"
    • @markimbriaco: When we say to decouple your code, we mean from other code and not from reality. Sorry that was confusing.
  • To program like a Martian take a look at Monitoring the Execution of Space Craft Flight Software. Software that delivered the rover within a foot of it's target and is expected to keep working autonomously for years, pretty much isn't programmed like how anything is programmed today. Lots of people, lots of testing, lots of threads, lots of state machines, it's defined in terms of properties using formal methods, and most code is generated. How could they have got it so wrong?
  • Take note funding seeking startupers and read Chris Dixon's Ten million users is the new one million users. If you are building a transaction oriented site, as in people pay money, then you will have to scale 10x less than if you are building a non-transactional site (ad supported).
Don't miss all that the Internet has to say on Scalability, click below and become eventually consistent with all scalability knowledge...

Click to read more ...

Tuesday
Aug072012

Sponsored Post: Palantir, Percona, ElasticHosts, Atlantic.Net, ScaleOut, ground(ctrl), New Relic, NetDNA, GigaSpaces, AiCache, Logic Monitor, AppDynamics, CloudSigma, ManageEngine, Site24x7

Who's Hiring?

Fun and Informative Events

  • Percona announces MySQL training for busy professional: Developer Training for MySQL. Percona is offering savings of over 35% for this course in the month of August.

Cool Products and Services

  • ElasticHosts launches white-label cloud reseller program offering 30% revenue share on fully rebranded cloud hosting.
  • Atlantic.Net with industry leading cloud servers backed by ultra-fast 40 Gigabits 4x Quad Rate Infiniband speeds, high throughput, low latency and newest RDMA technology. Free Trial Offer!
  • ScaleOut Software. In-memorry Data Grids for the Enterprise. Download a Free Trial.
  • Follow the Cloudify blog to learn more about our open source PaaS stack – latest integration recipes, builds, features, and other cool stuff.  Visit the GigaSpaces blog to learn how to take your application to the next level of scalability and performance.
  • New Relic - real user monitoring optimize for humans, not bots. Live application stats, SQL/NoSQL performance, web transactions, proactive notifications. Take 2 minutes to sign up for a free trial.
  • NetDNA, a Tier-1 GlobalContent Delivery Network, offers a Dual-CDN strategy which allows companies to utilize a redundant infrastructure while leveraging the advantages of multiple CDNs to reduce costs.
  • aiCache creates a better user experience by increasing the speed scale and stability of your web-site. Test aiCache acceleration for free.  No sign-up required. http://aicache.com/deploy
  • LogicMonitor - Hosted monitoring of your entire technology stack. Dashboards, trending graphs, alerting. Try it free and be up and running in just 15 minutes.
  • AppDynamics is the very first free product designed for troubleshooting Java performance while getting full visibility in production environments. Visit http://www.appdynamics.com/free.
  • CloudSigma. Utility style high performance cloud servers in the US and Europe delivered on all 10GigE networking. Run any OS, take advantage of SSD storage and tailored infrastructure options.
  • ManageEngine Applications Manager : Monitor physical, virtual and Cloud Applications.
  • www.site24x7.com : Monitor End User Experience from a global monitoring network.

For a longer description of each sponsor, please read more below...

Click to read more ...

Monday
Aug062012

Paper: High-Performance Concurrency Control Mechanisms for Main-Memory Databases

If you stayed up all night watching the life reaffirming Curiosity landing on Mars, then this paper, High-Performance Concurrency Control Mechanisms for Main-Memory Databases, has nothing to do with that at all, but it is an excellent look at how to use optimistic MVCC schemes to reduce lock overhead on in-memory datastructures:

A database system optimized for in-memory storage can support much higher transaction rates than current systems. However, standard concurrency control methods used today do not scale to the high transaction rates achievable by such systems. In this paper we introduce two efficient concurrency control methods specifically designed for main-memory databases. Both use multiversioning to isolate read-only transactions from updates but differ in how atomicity is ensured: one is optimistic and one is pessimistic. To avoid expensive context switching, transactions never block during normal processing but they may have to wait before commit to ensure correct serialization ordering. We also implemented a main-memory optimized version of single-version locking. Experimental results show that while single-version locking works well when transactions are short and contention is low performance degrades under more demanding conditions. The multiversion schemes have higher overhead but are much less sensitive to hotspots and the presence of long-running transactions.

This stuff isn't just for databases. Many applications have huge in-memory datastructures that are also accessed concurrently and can benefit from some of these ideas.

Sunday
Aug052012

Ask MemSQL: Anything you want to know about MemSQL?

A very shy team of ex-Facebookers have created MemSQL, what they claim is the world's fastest database, and I'll be interviewing them on Tuesday. Are there any questions you would like to ask the MemSQL team? If so, please contact me or make a comment on this thread.

 

Friday
Aug032012

Stuff The Internet Says On Scalability For August 3, 2012

It's HighScalability Time:

  • Quotable Quotes:
    • Ross Tur: the tricks you learned to make things big are not the same tricks you can apply to make things infinite. 
    • @gclaramunt: Son, I'm getting old, but let me tell you a secret: programming is hard, and high scalability and concurrent programming... frigging hard!
    • @Carnage4Life: At Apple the iOS team didn't see iPhone hardware or hardware team see OS until it shipped
    • @adrianco:  #ebspio caps iops but latency variance is much lower than EBS
    • @bernardgolden: RT @peakscale: A culture of automation is 10x more important than deployment/test/monkey thing you'd like to discuss < devops calling
    • @JayCollier: 50 years ago, school standardization was needed for scale. Now, scalability and flexibility (variability) can coexist. #FOL2012
    • @adrianco: Compared to vanilla EBS many times better for random reads. Bandwidth limits both for sequential and writes. #ebspio
    • @SQLPerfTips: More hardware won't solve response time problems. Proper indexing does.
    • @adrianco: I did some EBS Provisioned IOPS benchmarking. Excellent if you need lots of low latency random reads. #ebspio
    • @b6n: Can't wait for the new infinitely scalable, zero latency, totally consistent, transactional, distributed DB from @ryah and @antirez.
    • @theuncommonfan: if they can get 104 minutes out of "Where the Wild Things Are" they should be able 2 get 30 movies out of the Hobbit
  • Having just watched a Snark themed Inspector Lewis episode on BBC, I could not but help read a Joel Spolsky posting on The Hunting of the Snark, not about finding murderers, but about finding unfriendly comments, which might actually might lead to murder and make a good episode...
Don't miss all that the Internet has to say on Scalability, click below and become eventually consistent with all scalability knowledge...

Click to read more ...

Thursday
Aug022012

Strategy: Use Spare Region Capacity to Survive Availability Zone Failures

In the wake of the recent Amazon problems Ryan Lackey offers some practical first responder cloud survival advice:

If you're a large site (particularly a PaaS) on AWS and care about availability, you need to have spare capacity in your region (using Reserve Instances, like Netflix does) to cover when a single AZ disappears, and your own external to AWS load balancing (not DNS based), with your own per-AZ subsidiary load balancers (nginx or whatever) running within EC2.
You need a robust database layer, ideally multi-region or AWS + nonAWS, but that's more site specific. 
Going multiregion is the next step, and the above is an essential part of getting to that point.

 

Thursday
Aug022012

Ask DuckDuckGo: Is there Anything you Want to Know About DDG?

Next week I'm going to have the pleasure of interviewing Gabriel Weinberg, founder of rebel search engine DuckDuckGo. Is there anything you would like to know about DuckDuckGo that I can ask Gabe? Please contact me or comment on this thread with your deepest desires.

Wednesday
Aug012012

Prismatic Update: Machine Learning on Documents and Users

In update to Prismatic Architecture - Using Machine Learning on Social Networks to Figure Out What You Should Read on the Web, Jason Wolfe, even in the face of deadening fatigue from long nights spent getting their iPhone app out, has gallantly agreed to talk a little more about Primatic's approach to Machine Learning.

Documents and users are two areas where Prismatic applies ML (machine learning):

ML on Documents

Click to read more ...