Amazon Aurora म्हणजे काय? RDS MySQL आणि PostgreSQL सोबत तुलना
RDS MySQL = fixed fridge ची managed kitchen. Aurora = fridge आपोआप वाढतो, standby एकच fridge शेअर. भाषा MySQL/PostgreSQL — इंजिन वेगळं.
या chapter मध्ये तुम्ही काय शिकाल
- Aurora कशाशी compatible
- Storage RDS पेक्षा कसा वेगळा
- तुलना table
- Replicas, Serverless v2, cost
1. रोजचं उदाहरण
हे का लागतं?
PhonePe-style: MySQL compatibility, fast failover, 2 AM ला disk size अंदाज नको.
हे काय आहे?
Amazon Aurora = managed DB, MySQL/PostgreSQL compatible. Storage distributed, 10 GB steps, multi-AZ replicate.
2. Aurora vs RDS
| Topic | RDS MySQL/PG | Aurora |
|---|---|---|
| Storage | Allocated GB (+autoscale) | Auto-grow; वापरलेल्या GB चे पैसे |
| Replica | Replica = अनेकदा वेगळी copy | 15 replicas, एकच volume |
| Failover | Multi-AZ standby | Replica promotion जलद |
| Compatibility | Community engines | Wire-compatible Aurora engines |
| Cost | छोट्या steady ला स्वस्त | Labs ला जास्त; scale/HA ला चमकते |
Ravindra Bagale's Tip
Student blog: RDS MySQL पुरेसं. Aurora = storage/replica model किंवा company standard.
3. Serverless v2 (थोडक्यात)
Serverless v2 ACU scale करते. Spiky load साठी. Lambda सारखं fully idle-free नाही — minimum ACU पाहा.
नेहमीच्या चुका: कारण आणि पुढची योग्य तपासणी
एक reader busy आणि दुसरा मोकळा का दिसतो?
Reader endpoint नवीन connections वाटतो; त्याच connection मधली प्रत्येक query वेगळी वाटत नाही. App चे जुने pooled connections एकाच reader कडे राहू शकतात. Endpoint बिघडला असे समजण्याआधी connection distribution पाहा. Pool मधले connections कधी नव्याने घ्यायचे हे app सांभाळणाऱ्या व्यक्तीसोबत ठरवा.
Read-only connection वर write fail होते
Replicas असतील तर reader endpoint चे connection read-only replica कडे जाते. App ने कोणता endpoint घेतला आहे ते पाहा. Writes साठी cluster writer endpoint वापरा. Reader वर write चालवण्यासाठी protection बदलू नका.
Failover होताना app चे connection तुटते
ज्या DB instance ला connection होते ते unavailable झाले तर जुने connection तुटू शकते. Cluster endpoint सध्याचा writer शोधायला मदत करतो; जुने connection जिवंत ठेवत नाही. App ने पुन्हा connect करायला हवे. Payment किंवा order write विचार न करता पुन्हा चालवू नका.
काम करताना पडणारे प्रश्न आणि पूर्ण उत्तरे
Readers वाढवले तर एक मोठी query सगळ्या readers वर चालते का?
नाही. एक connection एका DB instance कडे जाते. एकाच वेळी येणारी read connections वाटण्यासाठी readers उपयोगी पडतात. Reader endpoint एक SQL query सगळ्या replicas मध्ये विभागत नाही.
Writer चा सध्याचा IP app मध्ये ठेवू नये का?
Failover नंतर writer बदलू शकतो. Cluster writer चे hostname वापरा आणि पुन्हा connect होताना client ला ते resolve करू द्या. आज copy केलेला IP उद्याच्या writer ची खात्री देत नाही.
Reader endpoint दिसला म्हणजे replica आहे का?
नाही. Cluster मध्ये फक्त primary असला तरी reader endpoint असतो. तेव्हा तो primary कडेच नेतो. वेगळी read capacity आहे का हे कळण्यासाठी cluster मधली instances पाहा.
4. Interview
प्र. MySQL compatible?
Aurora MySQL wire protocol (version महत्त्वाची).
प्र. Storage?
साधारण 10 GB steps.
प्र. Writer vs reader?
Writes = writer; reads = reader endpoint.
प्र. RDS कधी?
छोटे/स्वस्त labs; exact community engine.
प्र. Backup?
Continuous + snapshots — RDS सारखी सवय.
घरी करून बघा
- ap-south-1 calculator ने 1 महिना तुलना.
- पुढचा: Aurora create+delete.
थोडक्यात सांगायचं तर
- Aurora = MySQL/PG compatible + cloud storage.
- Replicas shared storage; failover strength.
- छोट्या labs ला RDS स्वस्त.
- Lab clusters delete.
सराव Tasks
Thane Housing Society हा ठाणे मधला रिअल इस्टेट व्यवसाय आहे. Mahesh Patwardhan त्यांचं IT व cloud काम पाहतात. त्यांचे पैसे INR मध्ये मोजले जातात आणि AWS resources ap-south-1 Region मध्ये चालतात. खालच्या tasks मध्ये तुम्ही या lesson मध्ये शिकलेलं वापरून त्यांची खरी कामं करता. सगळी नावं, account IDs, IP addresses व numbers सरावासाठी काल्पनिक आहेत.
0 / 12
सोपं मोठ्या orders आधी
का: RDS setup नंतर database query करणं रोजचं काम.
काय करायचं: Order id व amount, मोठी amount आधी.
Tables: customers(id, name, city) व orders(id, customer_id, amount, odate).
- Task कोणत्या table बद्दल आहे ते पाहा (box वरची table list).
- SQL statement step by step लिहा: काय, कुठून, कोणते rows.
- Statement ; ने संपवा.
- Check answer दाबा. Query table च्या practice copy वर चालते.
सोपं City नुसार customers
का: RDS setup नंतर database query करणं रोजचं काम.
काय करायचं: Pune मधल्या customers ची नावं.
Tables: customers(id, name, city) व orders(id, customer_id, amount, odate).
- Task कोणत्या table बद्दल आहे ते पाहा (box वरची table list).
- SQL statement step by step लिहा: काय, कुठून, कोणते rows.
- Statement ; ने संपवा.
- Check answer दाबा. Query table च्या practice copy वर चालते.
सोपं Database endpoint शोधा
का: App endpoint नावाने connect होतं, IP ने नाही.
काय करायचं: DB instance thanehousing-db describe करा.
- Task वाचा आणि ते कोणत्या AWS service बद्दल आहे ते ठरवा.
- aws लिहा, मग service चं नाव, मग operation (action शब्द).
- प्रत्येक आवश्यक flag (--name) व त्यापुढे task मधली value लिहा.
- Flags कोणत्याही क्रमाने चालतात. Check answer दाबा.
मध्यम एकूण sales
का: RDS setup नंतर database query करणं रोजचं काम.
काय करायचं: सगळ्या order amounts ची बेरीज.
Tables: customers(id, name, city) व orders(id, customer_id, amount, odate).
- Task कोणत्या table बद्दल आहे ते पाहा (box वरची table list).
- SQL statement step by step लिहा: काय, कुठून, कोणते rows.
- Statement ; ने संपवा.
- Check answer दाबा. Query table च्या practice copy वर चालते.
मध्यम Customer नावांसह orders
का: RDS setup नंतर database query करणं रोजचं काम.
काय करायचं: प्रत्येक customer नाव व order amount.
Tables: customers(id, name, city) व orders(id, customer_id, amount, odate).
- Task कोणत्या table बद्दल आहे ते पाहा (box वरची table list).
- SQL statement step by step लिहा: काय, कुठून, कोणते rows.
- Statement ; ने संपवा.
- Check answer दाबा. Query table च्या practice copy वर चालते.
मध्यम लहान orders काढा
का: RDS setup नंतर database query करणं रोजचं काम.
काय करायचं: 200 पेक्षा कमी amount चे orders delete.
Tables: customers(id, name, city) व orders(id, customer_id, amount, odate).
- Task कोणत्या table बद्दल आहे ते पाहा (box वरची table list).
- SQL statement step by step लिहा: काय, कुठून, कोणते rows.
- Statement ; ने संपवा.
- Check answer दाबा. Query table च्या practice copy वर चालते.
मध्यम City दुरुस्त करा
का: RDS setup नंतर database query करणं रोजचं काम.
काय करायचं: Customer 5 Rome ला गेले. Record update करा.
Tables: customers(id, name, city) व orders(id, customer_id, amount, odate).
- Task कोणत्या table बद्दल आहे ते पाहा (box वरची table list).
- SQL statement step by step लिहा: काय, कुठून, कोणते rows.
- Statement ; ने संपवा.
- Check answer दाबा. Query table च्या practice copy वर चालते.
मध्यम Multi-AZ सुरू करा
का: Multi-AZ दुसऱ्या AZ मध्ये standby ठेवतो व आपोआप failover करतो.
काय करायचं: thanehousing-db Multi-AZ करा व बदल लगेच लागू करा.
- Task वाचा आणि ते कोणत्या AWS service बद्दल आहे ते ठरवा.
- aws लिहा, मग service चं नाव, मग operation (action शब्द).
- प्रत्येक आवश्यक flag (--name) व त्यापुढे task मधली value लिहा.
- Flags कोणत्याही क्रमाने चालतात. Check answer दाबा.
अवघड Customer नुसार sales
का: RDS setup नंतर database query करणं रोजचं काम.
काय करायचं: Customer नुसार total, फक्त 1000 पेक्षा जास्त.
Tables: customers(id, name, city) व orders(id, customer_id, amount, odate).
- Task कोणत्या table बद्दल आहे ते पाहा (box वरची table list).
- SQL statement step by step लिहा: काय, कुठून, कोणते rows.
- Statement ; ने संपवा.
- Check answer दाबा. Query table च्या practice copy वर चालते.
अवघड Orders नसलेले customers
का: RDS setup नंतर database query करणं रोजचं काम.
काय करायचं: कधीच order न केलेल्या customers ची नावं.
Tables: customers(id, name, city) व orders(id, customer_id, amount, odate).
- Task कोणत्या table बद्दल आहे ते पाहा (box वरची table list).
- SQL statement step by step लिहा: काय, कुठून, कोणते rows.
- Statement ; ने संपवा.
- Check answer दाबा. Query table च्या practice copy वर चालते.
अवघड MySQL database बनवा
का: RDS database तुमच्यासाठी चालवतं: backups, patches व failover managed.
काय करायचं: RDS instance thanehousing-db बनवा: engine mysql, class db.t3.micro, 20 GiB storage, master user admin, master password $DB_PASS मधून.
- Task वाचा आणि ते कोणत्या AWS service बद्दल आहे ते ठरवा.
- aws लिहा, मग service चं नाव, मग operation (action शब्द).
- प्रत्येक आवश्यक flag (--name) व त्यापुढे task मधली value लिहा.
- Flags कोणत्याही क्रमाने चालतात. Check answer दाबा.
अवघड Read replica बनवा
का: Read replicas reports व read traffic main database वरून कमी करतात.
काय करायचं: Source thanehousing-db पासून thanehousing-db-ro read replica बनवा.
- Task वाचा आणि ते कोणत्या AWS service बद्दल आहे ते ठरवा.
- aws लिहा, मग service चं नाव, मग operation (action शब्द).
- प्रत्येक आवश्यक flag (--name) व त्यापुढे task मधली value लिहा.
- Flags कोणत्याही क्रमाने चालतात. Check answer दाबा.
उजळणी, तुलना आणि मुलाखत cards
हा lesson काही मिनिटांत revise करा. Cards phone वर save करा किंवा PNG download करा. प्रत्येक card वरचा QR हा lesson उघडतो.






अजून cards: Ravi Sir's Cards.