달력

32023  이전 다음

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31

MONDAY, DECEMBER 19, 2011 AT 9:05AM

Jeremy Cole, a DBA Team Lead/Database Architect at Twitter, gave a really good talk at the O'Reilly MySQL conference: Big and Small Data at @Twitter, where the topic was thinking of Twitter from the data perspective.

One of the interesting stories he told was of the transition from Twitter's old way of storing tweets using temporal sharding, to a more distributed approach using a new tweet store called T-bird, which is built on top of Gizzard, which is built using MySQL.

Twitter's Original Tweet Store:
  • Temporally sharded tweets was a good-idea-at-the-time architecture. Temporal sharding simply means tweets from the same date range are stored together on the same shard.
  • The problem is tweets filled up one machine, then a second, and then a third. You end up filling up one machine after another.
  • This is a pretty common approach and one that has some real flaws:
    • Load balancing. Most of the old machines didn't get any traffic because people are interested in what is happening now, especially with Twitter. 
    • Expensive. They filled up one machine, with all its replication slaves, every three weeks, which is an expensive setup.
    • Logistically complicated. Building a whole new cluster every three weeks is a pain for the DBA team.
Twitter's New Tweet Store:
  • When you tweet it's stored in an internal system called T-bird, which is built on top of Gizzard. Secondary indexes are stored in a separate system called T-flock, which is also Gizzard based.
  • Unique IDs for each tweet are generated by Snowflake, which can be more evenly sharded across a cluster. FlockDB is used for ID to ID mapping, storing the relationships between IDs (uses Gizzard).
  • Gizzard is Twitter's distributed data storage framework built on top of MySQL (InnoDB). 
    • InnoDB was chosen because it doesn't corrupt data. Gizzard us just a datastore. Data is fed in and you get it back out again. 
    • To get higher performance on individual nodes a lot of features like binary logs and replication are turned off. Gizzard handles sharding, replicating N copes of the data, and job scheduling. 
    • Gizzard is used as a building block for other storage systems at Twitter.
  • Gizzard implements a tweet store that isn't perfect in the sense of load balancing, but it allows:
    • Growing slowly over time without having to worry when machines are going to fill up or when they have to make a hard cut over at an exact time. 
    • DBAs can get some sleep. They don't have to make those decisions as frequently and they don't have to scale as inefficiently cost wise.
  • MySQL works well enough most of the time that it's worth using. Twitter values stability over features so they've stayed with older releases. 
  • MySQL doesn't work for ID generation and graph storage. 
  • MySQL is used for smaller datasets of < 1.5TB, which is the size of their RAID array, and as a backing store for larger datasets. 
  • Typical database server config: HP DL380, 72GB RAM, 24 disk RAID10. Good balance of memory and disk.
MySQL Isn't Used For Everything:
  • Cassandra is used for high velocity writes, and lower velocity reads. The advantage is Cassandra can run on cheaper hardware than MySQL, it can expand easier, and they like schemaless design.
  • Hadoop is used to process unstructured and large datasets, hundreds of billions of rows.
  • Vertica is being used for analytics and large aggregations and joins so they don't have to write MapReduce jobs.
Some Other Ideas:
  • Loose coupling. Whenever something breaks they realize it wasn't loosely coupled enough and something pushed back way to hard on something else. 
  • Soft launches. Decouple pushing a release out and driving new traffic to something. Features can be turned on and off.
  • Open source. Twitter is noted for open sourcing much of their infrastructure. Jeremy talks about open sourcing in a way that I've never heard before. His idea is as a developer, open sourcing code, means you can think about your software knowing it won't go away. It's not just another throw away piece of software inside a corporate blackhole. That gives you permission to think of corporate software development in a different, more lasting way, more meaningful way.

Great job Jeremy!

Related Articles

Posted by zhato

댓글을 달아 주세요

What is ebtables?

:: IT/:: Linux 2011. 11. 30. 10:42

The ebtables program is a filtering tool for a Linux-based bridging firewall. It enables transparent filtering of network traffic passing through a Linux bridge. The filtering possibilities are limited to link layer filtering and some basic filtering on higher network layers. Advanced logging, MAC DNAT/SNAT and brouter facilities are also included.

 

The ebtables tool can be combined with the other Linux filtering tools (iptables, ip6tables and arptables) to make a bridging firewall that is also capable of filtering these higher network layers. This is enabled through the bridge-netfilter architecture which is a part of the standard Linux kernel.

Posted by zhato

댓글을 달아 주세요

차에 연결해 쓸 수 있는 컴프레셔가 있어서 컴프레셔에 연결해 자전거 공기를 넣을 수 있는 주입기를 구매했다. 당연히 우리가 보통 자전거포에서 볼 수 있는 앞이 집게 형태로 되어있는 것을 구매했다. 아이들의 자전거에 여러번 공기를 채워주며 요긴하게 사용했다.

 

문제는 몇 주전 구매한 나의 MTB다. 한 두주 자전거를 타고나니 뒷바퀴의 바람이 좀 빠진듯하여 컴프레셔를 들고 차로가서 자전거 튜브의 주입구의 덮개를 열었는데… 갑자기 막막해 지는게… ㅋㅋㅋ 한번도 본적이 없던 주입구 였다…

 

내가 보통 보던 것은 위의 그림에서 일반 방식이라던 던롭 방식과 프레스타, 슈레더 방식이었다. 그런데… 내 자전거는 프레스타 방식이네… 생전 처음보는…

 

일단 휴대용 펌프를 빌려보았다. ㅡㅡ; 맞지 않네… 어제 나가서 사왔다 잘 된다. 어차피 휴대용 공기 주입기는 필요 했던거라… 그런데… 인터넷에서 사는 것 보다는 비싸네…ㅡㅡ;

 

오늘 찬찬히 검색을 해보니…

많은 사람들이 나처럼 난해함을 격었던지… 프레스타 방식의 어댑터를 팔고 있었다. 그런데… 가격이 천원 미만부터 만원이 넘는 것이 있던데… 무엇을 구매해야 하는지 모르겠다. 좀더 찾아보고 구매 해야 할 듯.

 

자전거 구매하시는 분들… 공기 주입구 방식이 어찌 되는 건지 사실 때 꼭! 확인하세요~~~

Posted by zhato

댓글을 달아 주세요

자전거를 타다.

:: Bike 2010. 5. 28. 23:52

문득 자전거를 타야겠다는 생각이 들어 자전거를 타려고 자전거를 세워둔 곳으로 갔다.

황사와 그 간의 비로 인해 자전거는 온통 먼지로 덮여 있었고, 뒷 바퀴는 바람이 거의 빠져 있었다.

질질 끌고 동네 자전거 가게로 가서 바람을 넣으려는데… 엥 이넘의 자전거 바람 넣는 곳이 맞지 않는다…

 

한 1분 고민하다가 다시 아파트로 자전거를 끌고 왔다.

일단 자전거를 차에 싣고 집으로 올라갔다.

컴프레셔를 창고에서 꺼내어 차로 가져다 실었다.

 

부릉 부릉… 가까운 카센터로 가서 30A 퓨즈를 구매해서 컴프레셔 퓨즈를 교체하고…

부릉 부릉… 다시 아파트 주차장으로 이동…

자전거 바람을 넣기…

자전거 안장 높이 조절…

자전거 안장 각도 조절

 

이제 출발 할까? 어라 iPhone 이어폰이 없네..ㅡㅡ; 또 여기 저기 찾다보니… 집에 있군…

 

그럼 진짜 출발!! 오후 3시 30분…

 

오랜만에 자전거를 타다 보니 좀 힘드네…

고개 넘고 다리 건너 이리저리 왔다 갔다 하다보니.. 우와 드디어 의왕시 도착

어라 여기까지 1시간 25분이나 소요 되었네…

 

안양천 입구 발견…

 

자전거 길이 잘 되어있네… 평지구…

신나게 달려달려… 가다보니… 어라… 집에는 어찌가지?… 배도 고프고… 의왕에서 돌렸어야 하는데…

남은 거리 보니 누나네 집이 더 가깝네… ㅡㅡ;

 

아웅… 가다 쉬다 가다 쉬다… 왜 나는 이상한 길로 들어서지..ㅡㅡ;

 

하여간 누나네 도착하니 6시 22분…

 

인라인타고 천안을 간것 보다도 짧은 거리인데… 너무 오래 걸렸군…

의왕까지 가는데 시간 & 체력을 너무 소비해서… ㅡㅡ;

 

20100528_자전거

Posted by zhato

댓글을 달아 주세요



아직 갈길이 멀다.

iPhone 에서 작성된 글입니다.
Posted by zhato

댓글을 달아 주세요



첫번째 나온 음식



iPhone 에서 작성된 글입니다.
Posted by zhato

댓글을 달아 주세요

에버랜드~~

:: Family 2010. 2. 21. 16:03
가족들과 조카를 데리고 에버랜드



iPhone 에서 작성된 글입니다.
Posted by zhato

댓글을 달아 주세요

아이패드에 실망한 후 점점 눈에 들어오는 제품들이 하나 둘 나오기 시작하는 군요^^;

플래시를 지원하고 1080p의 동영상을 재생할 수 있다는데… 이런 제품이 실제로 나온다면 안 끌릴 수 없을 듯합니다. 게다가 안드로이드를 OS로 채용해서 다양한 앱도 지원될 것으로 기대합니다.

아직 애플의 앱스토어 만큼의 앱이 없기에 약간의 아쉬움이 있지만… 올해 안드로이드 기반의 스마트폰이 시장의 주류를 이룬다면 안드로이드를 지원하는 앱도 많아 질 것으로 기대합니다. 폐쇄적인 정책의 애플 보다는 개방적인 안드로이드가 웬지 끌립니다.

 

passionemobileworld3819

제품이 출시가 기다려지네요…

Posted by zhato

댓글을 달아 주세요

백상민

:: 일상다반사 2009. 12. 1. 21:42


오늘 상민형을 만났다

iPhone 에서 작성된 글입니다.
Posted by zhato

댓글을 달아 주세요

어느덧 9월이 되어버렸다.

2009년의 시작에는 많은 다짐을 했건만 지금 뒤돌아보면 무엇 하나 제대로 해놓은 것이 없다. 매번 반성하고 다시 다짐을 해보지만 쉽지가 않다.

그래도 아직 4개월이 남았다. 연초에 다짐했던 것들을 지금이라도 다시 시작하면 늦지 않으리라 생각한다. - 왜냐구요? 지금 시작 안하면 내년 초에 다시 다짐을 할테니 그때보다는 지금이 빠르지 않겠어요?

    1. 글쓰기
      • 벌써 몇 년째 ‘올해는 블로그에 글을 많이 써서 글쓰기 숙련도를 높여 스킬 포인트를 업하자’라는 다짐을 하는데 올해도 그다지 많이 글을 쓰지 못했다. (그다지? 뭐 거의 쓰지도 않았으면서…)
    2. 영어
      • 이건 정말… 할 말이 없습니다. 박순백 박사님의 글을 보고 (링크가 어디갔지?) 다시 한번 다짐합니다. – 열심히 하자!! 아자! 아자!
    3. 가족
      • 올해는 정말 가족들과 주말에 오토캠핑을 꼭!! 자주 가겠다는 다짐을 했었는데… 한번도 못갔다. 올해 초 아이들에게 약속 했는데… 아이들의 설레임의 눈망울들이 원망의 눈망울로 변했다. – 겨울이 오기 전에 한번은 꼭! 가리라~~

아~ 그 외에도 여러 가지 다짐을 했었건만… 담배, 퇴근, 운동, 성격개조… 너무 많은 다짐을 하지 말자! 하나만이라도 잘 지키는 그런 아빠가 되자!!

Posted by zhato

댓글을 달아 주세요