System design: Strategies for dealing with heavy writes to a DB

I’d say a solution will be highly dependent of what exactly you need to do. A solution to write thousands of records per second might be very different from incrementing a counter in the example you provided. More so, there could be no tables at all to handle such load. Consistency/availability requirements are also missing … Read more

How do you scale HTTP server like Google?

google.com, update.microsoft.com, and other services which handle astonishingly high aggregate bandwidth do much of their magic via DNS. BGP Anycast routing is used to announce the IP address of their DNS servers from multiple points around the world. Each DNS server is configured to resolve google.com to IP addresses within a data center which is … Read more

Are there any REAL advantages to NoSQL over RDBMS for structured data on one machine?

If you’re starting off on a single server, then many advantages of NoSQL go out the window. The biggest advantages to the most popular NoSQL are high availability with less down time. Eventual consistency requirements can lead to performance improvements as well. It really depends on your needs. Document-based – If your data fits well … Read more

Celery and Django simple example

Assuming you have both Python’s celery and django-celery installed, create the following tasks.py file under your app: utils/tasks.py from celery import task # other imports @task() def create_user(data): user = User.objects.create_user( username=data[‘username’], email=None, password=data[‘password’] ) user.save() profile = UserProfile() profile.user = user profile.token = generate_token() profile.save() return None Delete your utils/utilities.py file in your example … Read more

Stateless Object Oriented Programming vs. Functional Programming?

It’s a question of degree. The advantages to using a functional language for functional programming are the carrot and the stick. The carrot is that functional languages have functional syntax and semantics and come with functional libraries. The stick is that functional languages can force you to adhere to certain standards. If you do FP … Read more