SlideShare una empresa de Scribd logo
1 de 48
Migrating from PostgreSQL to MySQL  at Cocolog Naoto Yokoyama, NIFTY Corporation Garth Webb, Six Apart Lisa Phillips, Six Apart Credits: Kenji Hirohama, Sumisho Computer Systems Corp.
Agenda ,[object Object],[object Object],[object Object],[object Object]
1. What is Cocolog
What is Cocolog ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Cocolog (Screenshot of home page) 2008/04 700 Thousand Users
Cocolog (Screenshot of home page) TypePad Cocolog
Cocolog template sets
Cocolog Growth (User)   ■ Cocolog   ■ Cocolog Free phase1 phase2 phase3 phase4
Cocolog Growth (Entry)   ■ Cocolog   ■ Cocolog Free phase1 phase2 phase3 phase4
Technology at Cocolog ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Monitoring ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Hard DB Service APL
Tips for migration ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
2. History of Cocolog
Phase1 2003/12 ~ (Entry: 0.04 Million ) Register Postgre SQL NAS WEB Static contents Published Before DBP 10servers TypePad
Phase2 2004/12 ~  (Entry: 7 Million ) Podcast Portal Profile   Etc.. Rich template Publish Book Tel Operator Support NAS WEB Static contents Published Postgre SQL Register TypePad Before DBP 50servers 2004/12 ~ 2005/5 ~
Phase2  - Problems ,[object Object],[object Object],[object Object]
Phase3 2006/3 ~  (Entry: 12 Million ) NAS WEB Static contents Published Web-API memcached Podcast Portal Profile   Etc.. Postgre SQL Rich template Publish Book Tel Operator Support Register TypePad Before DBP 200servers
Phase4 2007/4 ~  (Entry: 16 Million ) Web-API NAS WEB Static contents Published memcached Atom Mobile WEB Rich template Publish Book Tel Operator Support Register Typepad Postgre SQL Before DBP 300servers
Now 2008/4 ~ Web-API NAS WEB Static contents Published memcached Atom Mobile WEB Typepad Rich template Publish Book Tel Operator Support Register Multi MySQL After DBP 150servers
3.  TypePad Database Partitioning
Steps for Transitioning ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
TypePad Overview (PreDBP) ‏ Storage Database (Postgres) ‏ Static Content (HTML, Images, etc) ‏ Application Server Web Server TypeCast Server ATOM Server MEMCACHED Data Caching servers to reduce DB load Dedicated Server for TypeCast (via ATOM) ‏ https(443) ‏ http(80) ‏ http(80) : atom api memcached(11211) ‏ postgres(5432) ‏ Mail Server Internet nfs(2049) ‏ ADMIN(CRON) Server smtp(25) / pop(110) ‏ Blog Readers Blog Owners Mobile Blog Readers smtp(25) / pop(110) ‏ Cron Server for periodic asynchronous tasks
Why Partition? TypePad TypePad TypePad Non- User Role TypePad User Role (User0) ‏ All inquires (access) go to one DB(Postgres)  After DBP Current setup Inquiries (access) are divided among several DB(MySQL)  TypePad TypePad TypePad TypePad Global Role Non-User Role User Role (User1) ‏ User Role (User2) ‏ User Role (User3) ‏
Server Preparation Non- User Role TypePad User Role (User0) ‏ DB(PostgreSQL) ‏ User Role (User1) ‏ User Role (User2) ‏ User Role (User3) ‏ Global Role Non-User Role New expanded setup DB(MySQL) ‏  for partitioned data Current Setup Job Server + TypePad  + Schwartz Schwartz DB User information is partitioned Maintains user mapping and primary key generation Stores  job details Server for executing Jobs ※ Grey areas are not used in current steps Asynchronous Job Server Information that does not need to be partitioned (such as session information) ‏
Global Write Creating the user map Non- User Role TypePad User Role (User0) ‏ DB(PostgreSQL) ‏ User Role (User1) ‏ User Role (User2) ‏ User Role (User3) ‏ Global Role Non-User Role Job Server + TypePad  + Schwartz Schwartz DB ① ② Explanation  ①: For new registrations only, uniquely identifying user data is written to the global DB  ②: This same data continues to be written to the existing DB DB(MySQL) ‏  for partitioned data Asynchronous Job Server Maintains user mapping and primary key generation ※ Grey areas are not used in current steps
Global Read Use the user map to find the user partition Non- User Role TypePad User Role (User0) ‏ DB(PostgreSQL) ‏ User Role (User1) ‏ User Role (User2) ‏ User Role (User3) ‏ Global Role Non-User Role Job Server + TypePad  + Schwartz Schwartz DB Explanation  ①: Migrate existing user data to the global DB  ②: At start of the request, the application queries global DB for the location of user data  ③: The application then talks to this DB for all queries about this user.  At this stage the global DB points to the user0 partition in all cases. DB(MySQL) ‏  for partitioned data Maintains user mapping and primary key generation ① Migrate existing user data Asynchronous Job Server ② ③ ※ Grey areas are not used in current steps
Move Sequence Migrating primary key generation Non- User Role TypePad User Role (User0) ‏ DB(PostgreSQL) ‏ User Role (User1) ‏ User Role (User2) ‏ User Role (User3) ‏ Global Role Non-User Role Job Server + TypePad  + Schwartz Schwartz DB Explanation  ①: Postgres sequences (for generating unique primary keys) are migrated to tables on the global DB that act as “pseudo-sequences”.  ②  Application requests new primary keys from global DB rather than the user partition. DB(MySQL) ‏  for partitioned data Maintains user mapping and primary key generation ① ※ Grey areas are not used in current steps Migrate sequence  management Asynchronous Job Server ②
User Data Move Moving user data to the new user-role partitions Non- User Role TypePad User Role (User0) ‏ DB(PostgreSQL) ‏ User Role (User1) ‏ User Role (User2) ‏ User Role (User3) ‏ Global Role Non-User Role Job Server + TypePad  + Schwartz Schwartz DB Explanation  ①: Existing users that should be migrated by Job Server are submitted as new Schwartz jobs.  User data is then migrated asynchronously  ②: If a comment arrives while the user is being migrated, it is saved in the Schwartz DB to be published later.  ③: After being migrated all user data will exist on the user-role DB partitions  ④: Once all user data is migrated, only non-user data is on Postgres DB(MySQL) ‏  for partitioned data Stores  job details Server for executing Jobs Maintains user mapping and primary key generation User information is partitioned ① ② ※ Grey areas are not used in current steps ③ Migrating each  user data DB(MySQL) ‏  for partitioned data ④
New User Partition New registrations are created on one user role partition Non- User Role TypePad User Role (User0) ‏ DB(PostgreSQL) ‏ User Role (User1) ‏ User Role (User2) ‏ User Role (User3) ‏ Global Role Non-User Role Job Server + TypePad  + Schwartz Schwartz DB Explanation  ①: When new users register, user data is written to a user role partition.  ②: Non-user data continues to be served off Postgres DB(MySQL) ‏  for partitioned data Maintains user mapping and primary key generation User information is partitioned ① ② ※ Grey areas are not used in current steps Asynchronous Job Server
New User Strategy Pick a scheme for distributing new users Non- User Role TypePad User Role (User0) ‏ DB(PostgreSQL) ‏ User Role (User1) ‏ User Role (User2) ‏ User Role (User3) ‏ Global Role Non-User Role Job Server + TypePad  + Schwartz Schwartz DB Explanation  ①: When new users register, user data is written to one of the user role partitions, depending on a set distribution method (round robin, random, etc)  ②: Non-user data continues to be served off Postgres DB(MySQL) ‏  for partitioned data Maintains user mapping and primary key generation User information is partitioned ① ② ※ Grey areas are not used in current steps Asynchronous Job Server
Non User Data Move Migrate data that cannot be partitioned by user Non- User Role TypePad User Role (User0) ‏ DB(PostgreSQL) ‏ User Role (User1) ‏ User Role (User2) ‏ User Role (User3) ‏ Global Role Non-User Role Job Server + TypePad  + Schwartz Schwartz DB Explanation  ①: Migrate non-user role data left on PostgreSQL to the MySQL side. DB(MySQL) ‏  for partitioned data Maintains user mapping and primary key generation User information is partitioned ① ※ Grey areas are not used in current steps Migrate non-User  data Asynchronous Job Server Information that does not need to be partitioned (such as session information) ‏
Data migration done Non- User Role TypePad User Role (User0) ‏ DB(Postgres) ‏ User Role (User1) ‏ User Role (User2) ‏ User Role (User3) ‏ Global Role Non-User Role Job Server + TypePad  + Schwartz Schwartz DB Explanation  ①: All data access is now done through MySQL  ②: Continue to use The Schwartz for asynchronous jobs DB(MySQL) ‏  for partitioned data Stores  job details Server for executing Jobs Maintains user mapping and primary key generation User information is partitioned ① ※ Grey areas are not used in current steps ① ② Asynchronous Job Server Information that does not need to be partitioned (such as session information) ‏
The New TypePad configuration Storage Database (MySQL) ‏ Static Content (HTML, Images, etc) ‏ Application Server Web Server TypeCast Server ATOM Server MEMCACHED Data Caching servers to reduce DB load Dedicated Server for TypeCast (via ATOM) ‏ https(443) ‏ http(80) ‏ http(80) : atom api memcached(11211) ‏ MySQL(3306) ‏ Mail Server Internet nfs(2049) ‏ ADMIN(CRON) Server smtp(25) / pop(110) ‏ Blog Readers Blog Owners (management interface) ‏ Mobile Blog Readers smtp(25) / pop(110) ‏ Cron Server for periodic asynchronous tasks Job Server TheSchwartz server for running ad-hoc jobs asynchronously
4. Migration from PostgreSQL to MySQL
[object Object],History of scale up PostgreSQL server, Before DBP Yes 16GB MP3.3GHz/1M×4 〔 2Core×4 〕 AS4 (2.6.9) 2003/12 2007/11 Time AS4 (2.6.9) AS2.1(2.4.9) ES2.1(2.4.9) ES2.1(2.4.9) 7.4(2.4.9) OS(RedHat) 3.2GHz/1M×4 3.2GHz/1M×4 3.2GHz/1M×2 3.2GHz/1M×2 1.8GHz/512k×1 CPU Xeon 12GB 12GB 4GB 4GB 1GB MEM Yes Yes Yes No No DiskArray
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],http://www.computers.us.fujitsu.com/www/products_storage.shtml?products/storage/fujitsu/e8000/e8000 History of scale up PostgreSQL server, Before DBP
Scale out MySQL servers, After DBP ,[object Object],[object Object],[object Object],[object Object]
Scale out MySQL servers, After DBP PostgreSQL FibreChannel SAN DiskArray … heart beat TypePad Application   MySQL Role3 MySQL Role2 MySQL Role1
Scale out MySQL servers, After DBP ,[object Object],[object Object]
Scale out MySQL servers, After DBP PostgreSQL FibreChannel SAN DiskArray … heart beat MySQL BackupRole TypePad Application   mysqld mysqld mysqld rep rep rep opc mysqld mysqld mysqld MySQL Role3 MySQL Role2 MySQL Role1
Troubles with PostreSQL 7.4 – 8.1 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Troubles with PostgreSQL 7.4 – 8.1 ,[object Object],[object Object]
“ Cleaning” data ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],dump Split UTF8->UCS2->UTF8 Merge restore
Migration from PostgreSQL to MySQL using TypePad script ,[object Object],[object Object],[object Object],[object Object],[object Object],TypePad TypePad PostgreSQL Document Object tmp Document Object last File check data check
Troubles with MySQL ,[object Object],[object Object],[object Object],[object Object]
Cocolog Future Plans ,[object Object],[object Object]
Consulting by ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Questions

Más contenido relacionado

Destacado (16)

AAAAA
AAAAAAAAAA
AAAAA
 
Differential Diagnosis
Differential DiagnosisDifferential Diagnosis
Differential Diagnosis
 
Shkruajmedrite Mail
Shkruajmedrite MailShkruajmedrite Mail
Shkruajmedrite Mail
 
10kb
10kb10kb
10kb
 
 
Shift Design
Shift DesignShift Design
Shift Design
 
Yahoo! etude automobile slide share
Yahoo!   etude automobile   slide shareYahoo!   etude automobile   slide share
Yahoo! etude automobile slide share
 
UpTest
UpTestUpTest
UpTest
 
CCCCC
CCCCCCCCCC
CCCCC
 
UploadTest
UploadTestUploadTest
UploadTest
 
BBBBB
BBBBBBBBBB
BBBBB
 
DDDDD
DDDDDDDDDD
DDDDD
 
UpTest
UpTestUpTest
UpTest
 
UpTest
UpTestUpTest
UpTest
 
Transparansi Tata Kelola Pertambangan
Transparansi Tata Kelola PertambanganTransparansi Tata Kelola Pertambangan
Transparansi Tata Kelola Pertambangan
 
Persona - User Centred Design
Persona - User Centred Design Persona - User Centred Design
Persona - User Centred Design
 

Similar a Slideshow title

Understanding Hadoop
Understanding HadoopUnderstanding Hadoop
Understanding HadoopAhmed Ossama
 
Database Migration using Oracle SQL Developer: DBA Stuff for the Non-DBA
Database Migration using Oracle SQL Developer: DBA Stuff for the Non-DBADatabase Migration using Oracle SQL Developer: DBA Stuff for the Non-DBA
Database Migration using Oracle SQL Developer: DBA Stuff for the Non-DBADanny Bryant
 
Oracle applications r12.2, ebr, online patching means lot of work for devel...
Oracle applications r12.2, ebr, online patching   means lot of work for devel...Oracle applications r12.2, ebr, online patching   means lot of work for devel...
Oracle applications r12.2, ebr, online patching means lot of work for devel...Ajith Narayanan
 
Db2 migration -_tips,_tricks,_and_pitfalls
Db2 migration -_tips,_tricks,_and_pitfallsDb2 migration -_tips,_tricks,_and_pitfalls
Db2 migration -_tips,_tricks,_and_pitfallssam2sung2
 
How to scale your web app
How to scale your web appHow to scale your web app
How to scale your web appGeorgio_1999
 
Big data should be simple
Big data should be simpleBig data should be simple
Big data should be simpleDori Waldman
 
OpenSource Big Data Platform - Flamingo Project
OpenSource Big Data Platform - Flamingo ProjectOpenSource Big Data Platform - Flamingo Project
OpenSource Big Data Platform - Flamingo ProjectBYOUNG GON KIM
 
Slide 1 - St. Louis SharePoint Users Group
Slide 1 - St. Louis SharePoint Users GroupSlide 1 - St. Louis SharePoint Users Group
Slide 1 - St. Louis SharePoint Users Groupwebhostingguy
 
Handling Database Deployments
Handling Database DeploymentsHandling Database Deployments
Handling Database DeploymentsMike Willbanks
 
Scylla Summit 2016: Scylla at Samsung SDS
Scylla Summit 2016: Scylla at Samsung SDSScylla Summit 2016: Scylla at Samsung SDS
Scylla Summit 2016: Scylla at Samsung SDSScyllaDB
 
Elements for an iOS Backend
Elements for an iOS BackendElements for an iOS Backend
Elements for an iOS BackendLaurent Cerveau
 
Shared Personalization Service - How To Scale to 15K RPS, Patrice Pelland
Shared Personalization Service - How To Scale to 15K RPS, Patrice PellandShared Personalization Service - How To Scale to 15K RPS, Patrice Pelland
Shared Personalization Service - How To Scale to 15K RPS, Patrice PellandFuenteovejuna
 
Db2 analytics accelerator on ibm integrated analytics system technical over...
Db2 analytics accelerator on ibm integrated analytics system   technical over...Db2 analytics accelerator on ibm integrated analytics system   technical over...
Db2 analytics accelerator on ibm integrated analytics system technical over...Daniel Martin
 
Dynamic DDL: Adding structure to streaming IoT data on the fly
Dynamic DDL: Adding structure to streaming IoT data on the flyDynamic DDL: Adding structure to streaming IoT data on the fly
Dynamic DDL: Adding structure to streaming IoT data on the flyDataWorks Summit
 
Server 2008 r2 ppt
Server 2008 r2 pptServer 2008 r2 ppt
Server 2008 r2 pptRaj Solanki
 

Similar a Slideshow title (20)

Understanding Hadoop
Understanding HadoopUnderstanding Hadoop
Understanding Hadoop
 
Database Migration using Oracle SQL Developer: DBA Stuff for the Non-DBA
Database Migration using Oracle SQL Developer: DBA Stuff for the Non-DBADatabase Migration using Oracle SQL Developer: DBA Stuff for the Non-DBA
Database Migration using Oracle SQL Developer: DBA Stuff for the Non-DBA
 
Oracle applications r12.2, ebr, online patching means lot of work for devel...
Oracle applications r12.2, ebr, online patching   means lot of work for devel...Oracle applications r12.2, ebr, online patching   means lot of work for devel...
Oracle applications r12.2, ebr, online patching means lot of work for devel...
 
Db2 migration -_tips,_tricks,_and_pitfalls
Db2 migration -_tips,_tricks,_and_pitfallsDb2 migration -_tips,_tricks,_and_pitfalls
Db2 migration -_tips,_tricks,_and_pitfalls
 
How to scale your web app
How to scale your web appHow to scale your web app
How to scale your web app
 
Big data should be simple
Big data should be simpleBig data should be simple
Big data should be simple
 
OpenSource Big Data Platform - Flamingo Project
OpenSource Big Data Platform - Flamingo ProjectOpenSource Big Data Platform - Flamingo Project
OpenSource Big Data Platform - Flamingo Project
 
Slide 1 - St. Louis SharePoint Users Group
Slide 1 - St. Louis SharePoint Users GroupSlide 1 - St. Louis SharePoint Users Group
Slide 1 - St. Louis SharePoint Users Group
 
Handling Database Deployments
Handling Database DeploymentsHandling Database Deployments
Handling Database Deployments
 
Scylla Summit 2016: Scylla at Samsung SDS
Scylla Summit 2016: Scylla at Samsung SDSScylla Summit 2016: Scylla at Samsung SDS
Scylla Summit 2016: Scylla at Samsung SDS
 
Elements for an iOS Backend
Elements for an iOS BackendElements for an iOS Backend
Elements for an iOS Backend
 
dba_sathish
dba_sathishdba_sathish
dba_sathish
 
Shared Personalization Service - How To Scale to 15K RPS, Patrice Pelland
Shared Personalization Service - How To Scale to 15K RPS, Patrice PellandShared Personalization Service - How To Scale to 15K RPS, Patrice Pelland
Shared Personalization Service - How To Scale to 15K RPS, Patrice Pelland
 
Oracle's history
Oracle's historyOracle's history
Oracle's history
 
Db2 analytics accelerator on ibm integrated analytics system technical over...
Db2 analytics accelerator on ibm integrated analytics system   technical over...Db2 analytics accelerator on ibm integrated analytics system   technical over...
Db2 analytics accelerator on ibm integrated analytics system technical over...
 
Hadoop introduction
Hadoop introductionHadoop introduction
Hadoop introduction
 
MS-SQL SERVER ARCHITECTURE
MS-SQL SERVER ARCHITECTUREMS-SQL SERVER ARCHITECTURE
MS-SQL SERVER ARCHITECTURE
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
 
Dynamic DDL: Adding structure to streaming IoT data on the fly
Dynamic DDL: Adding structure to streaming IoT data on the flyDynamic DDL: Adding structure to streaming IoT data on the fly
Dynamic DDL: Adding structure to streaming IoT data on the fly
 
Server 2008 r2 ppt
Server 2008 r2 pptServer 2008 r2 ppt
Server 2008 r2 ppt
 

Más de arase_utagoe (6)

2MB_2
2MB_22MB_2
2MB_2
 
5MB
5MB5MB
5MB
 
1MB
1MB1MB
1MB
 
100KB
100KB100KB
100KB
 
Slideshow title
Slideshow titleSlideshow title
Slideshow title
 
Slideshow title
Slideshow titleSlideshow title
Slideshow title
 

Último

Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 

Último (20)

Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 

Slideshow title

  • 1. Migrating from PostgreSQL to MySQL at Cocolog Naoto Yokoyama, NIFTY Corporation Garth Webb, Six Apart Lisa Phillips, Six Apart Credits: Kenji Hirohama, Sumisho Computer Systems Corp.
  • 2.
  • 3. 1. What is Cocolog
  • 4.
  • 5. Cocolog (Screenshot of home page) 2008/04 700 Thousand Users
  • 6. Cocolog (Screenshot of home page) TypePad Cocolog
  • 8. Cocolog Growth (User)   ■ Cocolog   ■ Cocolog Free phase1 phase2 phase3 phase4
  • 9. Cocolog Growth (Entry)   ■ Cocolog   ■ Cocolog Free phase1 phase2 phase3 phase4
  • 10.
  • 11.
  • 12.
  • 13. 2. History of Cocolog
  • 14. Phase1 2003/12 ~ (Entry: 0.04 Million ) Register Postgre SQL NAS WEB Static contents Published Before DBP 10servers TypePad
  • 15. Phase2 2004/12 ~ (Entry: 7 Million ) Podcast Portal Profile Etc.. Rich template Publish Book Tel Operator Support NAS WEB Static contents Published Postgre SQL Register TypePad Before DBP 50servers 2004/12 ~ 2005/5 ~
  • 16.
  • 17. Phase3 2006/3 ~ (Entry: 12 Million ) NAS WEB Static contents Published Web-API memcached Podcast Portal Profile Etc.. Postgre SQL Rich template Publish Book Tel Operator Support Register TypePad Before DBP 200servers
  • 18. Phase4 2007/4 ~ (Entry: 16 Million ) Web-API NAS WEB Static contents Published memcached Atom Mobile WEB Rich template Publish Book Tel Operator Support Register Typepad Postgre SQL Before DBP 300servers
  • 19. Now 2008/4 ~ Web-API NAS WEB Static contents Published memcached Atom Mobile WEB Typepad Rich template Publish Book Tel Operator Support Register Multi MySQL After DBP 150servers
  • 20. 3. TypePad Database Partitioning
  • 21.
  • 22. TypePad Overview (PreDBP) ‏ Storage Database (Postgres) ‏ Static Content (HTML, Images, etc) ‏ Application Server Web Server TypeCast Server ATOM Server MEMCACHED Data Caching servers to reduce DB load Dedicated Server for TypeCast (via ATOM) ‏ https(443) ‏ http(80) ‏ http(80) : atom api memcached(11211) ‏ postgres(5432) ‏ Mail Server Internet nfs(2049) ‏ ADMIN(CRON) Server smtp(25) / pop(110) ‏ Blog Readers Blog Owners Mobile Blog Readers smtp(25) / pop(110) ‏ Cron Server for periodic asynchronous tasks
  • 23. Why Partition? TypePad TypePad TypePad Non- User Role TypePad User Role (User0) ‏ All inquires (access) go to one DB(Postgres) After DBP Current setup Inquiries (access) are divided among several DB(MySQL) TypePad TypePad TypePad TypePad Global Role Non-User Role User Role (User1) ‏ User Role (User2) ‏ User Role (User3) ‏
  • 24. Server Preparation Non- User Role TypePad User Role (User0) ‏ DB(PostgreSQL) ‏ User Role (User1) ‏ User Role (User2) ‏ User Role (User3) ‏ Global Role Non-User Role New expanded setup DB(MySQL) ‏ for partitioned data Current Setup Job Server + TypePad + Schwartz Schwartz DB User information is partitioned Maintains user mapping and primary key generation Stores job details Server for executing Jobs ※ Grey areas are not used in current steps Asynchronous Job Server Information that does not need to be partitioned (such as session information) ‏
  • 25. Global Write Creating the user map Non- User Role TypePad User Role (User0) ‏ DB(PostgreSQL) ‏ User Role (User1) ‏ User Role (User2) ‏ User Role (User3) ‏ Global Role Non-User Role Job Server + TypePad + Schwartz Schwartz DB ① ② Explanation  ①: For new registrations only, uniquely identifying user data is written to the global DB  ②: This same data continues to be written to the existing DB DB(MySQL) ‏ for partitioned data Asynchronous Job Server Maintains user mapping and primary key generation ※ Grey areas are not used in current steps
  • 26. Global Read Use the user map to find the user partition Non- User Role TypePad User Role (User0) ‏ DB(PostgreSQL) ‏ User Role (User1) ‏ User Role (User2) ‏ User Role (User3) ‏ Global Role Non-User Role Job Server + TypePad + Schwartz Schwartz DB Explanation  ①: Migrate existing user data to the global DB  ②: At start of the request, the application queries global DB for the location of user data  ③: The application then talks to this DB for all queries about this user. At this stage the global DB points to the user0 partition in all cases. DB(MySQL) ‏ for partitioned data Maintains user mapping and primary key generation ① Migrate existing user data Asynchronous Job Server ② ③ ※ Grey areas are not used in current steps
  • 27. Move Sequence Migrating primary key generation Non- User Role TypePad User Role (User0) ‏ DB(PostgreSQL) ‏ User Role (User1) ‏ User Role (User2) ‏ User Role (User3) ‏ Global Role Non-User Role Job Server + TypePad + Schwartz Schwartz DB Explanation  ①: Postgres sequences (for generating unique primary keys) are migrated to tables on the global DB that act as “pseudo-sequences”.  ② Application requests new primary keys from global DB rather than the user partition. DB(MySQL) ‏ for partitioned data Maintains user mapping and primary key generation ① ※ Grey areas are not used in current steps Migrate sequence management Asynchronous Job Server ②
  • 28. User Data Move Moving user data to the new user-role partitions Non- User Role TypePad User Role (User0) ‏ DB(PostgreSQL) ‏ User Role (User1) ‏ User Role (User2) ‏ User Role (User3) ‏ Global Role Non-User Role Job Server + TypePad + Schwartz Schwartz DB Explanation  ①: Existing users that should be migrated by Job Server are submitted as new Schwartz jobs. User data is then migrated asynchronously  ②: If a comment arrives while the user is being migrated, it is saved in the Schwartz DB to be published later.  ③: After being migrated all user data will exist on the user-role DB partitions  ④: Once all user data is migrated, only non-user data is on Postgres DB(MySQL) ‏ for partitioned data Stores job details Server for executing Jobs Maintains user mapping and primary key generation User information is partitioned ① ② ※ Grey areas are not used in current steps ③ Migrating each user data DB(MySQL) ‏ for partitioned data ④
  • 29. New User Partition New registrations are created on one user role partition Non- User Role TypePad User Role (User0) ‏ DB(PostgreSQL) ‏ User Role (User1) ‏ User Role (User2) ‏ User Role (User3) ‏ Global Role Non-User Role Job Server + TypePad + Schwartz Schwartz DB Explanation  ①: When new users register, user data is written to a user role partition.  ②: Non-user data continues to be served off Postgres DB(MySQL) ‏ for partitioned data Maintains user mapping and primary key generation User information is partitioned ① ② ※ Grey areas are not used in current steps Asynchronous Job Server
  • 30. New User Strategy Pick a scheme for distributing new users Non- User Role TypePad User Role (User0) ‏ DB(PostgreSQL) ‏ User Role (User1) ‏ User Role (User2) ‏ User Role (User3) ‏ Global Role Non-User Role Job Server + TypePad + Schwartz Schwartz DB Explanation  ①: When new users register, user data is written to one of the user role partitions, depending on a set distribution method (round robin, random, etc)  ②: Non-user data continues to be served off Postgres DB(MySQL) ‏ for partitioned data Maintains user mapping and primary key generation User information is partitioned ① ② ※ Grey areas are not used in current steps Asynchronous Job Server
  • 31. Non User Data Move Migrate data that cannot be partitioned by user Non- User Role TypePad User Role (User0) ‏ DB(PostgreSQL) ‏ User Role (User1) ‏ User Role (User2) ‏ User Role (User3) ‏ Global Role Non-User Role Job Server + TypePad + Schwartz Schwartz DB Explanation  ①: Migrate non-user role data left on PostgreSQL to the MySQL side. DB(MySQL) ‏ for partitioned data Maintains user mapping and primary key generation User information is partitioned ① ※ Grey areas are not used in current steps Migrate non-User data Asynchronous Job Server Information that does not need to be partitioned (such as session information) ‏
  • 32. Data migration done Non- User Role TypePad User Role (User0) ‏ DB(Postgres) ‏ User Role (User1) ‏ User Role (User2) ‏ User Role (User3) ‏ Global Role Non-User Role Job Server + TypePad + Schwartz Schwartz DB Explanation  ①: All data access is now done through MySQL  ②: Continue to use The Schwartz for asynchronous jobs DB(MySQL) ‏ for partitioned data Stores job details Server for executing Jobs Maintains user mapping and primary key generation User information is partitioned ① ※ Grey areas are not used in current steps ① ② Asynchronous Job Server Information that does not need to be partitioned (such as session information) ‏
  • 33. The New TypePad configuration Storage Database (MySQL) ‏ Static Content (HTML, Images, etc) ‏ Application Server Web Server TypeCast Server ATOM Server MEMCACHED Data Caching servers to reduce DB load Dedicated Server for TypeCast (via ATOM) ‏ https(443) ‏ http(80) ‏ http(80) : atom api memcached(11211) ‏ MySQL(3306) ‏ Mail Server Internet nfs(2049) ‏ ADMIN(CRON) Server smtp(25) / pop(110) ‏ Blog Readers Blog Owners (management interface) ‏ Mobile Blog Readers smtp(25) / pop(110) ‏ Cron Server for periodic asynchronous tasks Job Server TheSchwartz server for running ad-hoc jobs asynchronously
  • 34. 4. Migration from PostgreSQL to MySQL
  • 35.
  • 36.
  • 37.
  • 38. Scale out MySQL servers, After DBP PostgreSQL FibreChannel SAN DiskArray … heart beat TypePad Application MySQL Role3 MySQL Role2 MySQL Role1
  • 39.
  • 40. Scale out MySQL servers, After DBP PostgreSQL FibreChannel SAN DiskArray … heart beat MySQL BackupRole TypePad Application mysqld mysqld mysqld rep rep rep opc mysqld mysqld mysqld MySQL Role3 MySQL Role2 MySQL Role1
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.

Notas del editor

  1. Nifty の横山です。今日はよろしくお願いします。 このような大変名誉ある場で発表の機会をいただけて、関係者各位に対し感謝いたします。 今日はよろしくお願いいたします。