SlideShare ist ein Scribd-Unternehmen logo
1 von 10
Downloaden Sie, um offline zu lesen
Web scale monitoring
 using gearman, redis, mojolicious, Angular.
js, gnuplot and PostgreSQL as NoSQL store
                Dobrica Pavlinušić
                http://blog.rot13.org
                DORS/CLUC 2012
Goals
● define problem in terms of scaling
   ○ Gearman as distributed fork
● don't lock yourself into technological choice
   ○ relational data database, so what?
● don't mungle and rename data
   ○ preserve naming through whole stack
● test driven development
   ○ small iterations, easy deployment
● is your cache really useful?
   ○ can you make web interface out of it?
● why are web interfaces hard?
   ○ Angular.js comes to rescue!
Project specification
● Existing perl scripts parse telnet output
   ○ end-users (CPE)
   ○ equipment in-between (MSAN, DSLAM)
● Create monitoring system!
● Users data split between LDAP and CRM
● Horizontal scalability (on single box!)
   ○ number of users grow
● Store data in relational database for
  reporting
   ○ All collected data is interesting
● Web interface to inspect data
  ○ prototype http://youtu.be/Cp31xUdyZBQ
Proposed architecture
● Gearman as queue server
  ○ workers collect, process and store data
  ○ Gearman::Driver fork workers on-demand
● PostgreSQL with hstore
  ○ don't mungle data - not normalized
  ○ use views for reporting
  ○ table inheritance for easy expiry of data
● Redis rich structures for data caching
  ○ provide "warm" data for Web interface
● Web: mojolicious, Angular.js, gnuplot
  ○ gearman calls and SQL queries to JSONP
Web UI     PostgreSQL



                                        store



                         Gearm                                        LDAP
        Redis                                   LDAP
                          an



                                                XML/R
                                                                      CRM
                                                 PC



 CPE        DSLAM        MSAN
                                         poll
 *40        34*1-5       40*1-5
                                          *1
~5300       ~2300        ~1100                           15 min pull interval
                                                        dual-core, 4Gb RAM
                                                         130-300 processes

                                         cron
More information
http://gearman.org/

http://redis.io/

http://www.postgresql.org/

http://mojolicio.us/

http://angularjs.org/
Queue
● distributed (across cores) on-demand fork
● German::Driver manages workers
    ○   min, max process limits
    ○   copy-on-write fork
    ○   three master processes (services, MSAN, DSLAM)
    ○   modify process name for status info (ps ax)
●   german workers
    ○ pollers generate timestamp for data (inserts are
      queued!)
    ○ one per work (CPE pollers)
    ○ persistent workers (TCP connection to
      MSAN/DSLAM is re-used for all work)
Cache with structures
● store
   ○ all data from gearman calls (which are slow)
   ○ statistics from poll workers
● expire data after poll interval
   ○ fresh data for web interface
● name your keys in sane way!
   ○   CPE.*, ZTEMSAN.*, ZTEDSLAM.* (poll stats)
   ○   CRM.login, LDAP.login
   ○   table.dslam.login (last row inserted)
   ○   columns.dslam (existence, needed for Web)
hstore
● store key-value pairs (single-level) in single
  column
● additional columns to support indexes
   ○ GiST and GIN indexes on hstore are not enough
● table inheritance
   ○ partitioning of tables by date
   ○ DELETE and VACUUM can take a long time
   ○ set sql_inheritance = false
● using PostgreSQL 8.4 (nothing new!)
● PostgreSQL 9.2 will have JSON type
  support and v8!
Web interface
● mojolicious
  ○ web server and JSON provider
  ○ MojoX::Gearman
● gnuplot graphs from huge amount of data
  ○ JavaScript doesn't cut it!
  ○ get textual data from gearman
  ○ generate graphs on-the-fly
● Angular.js as nice way to generate HTML
  from JSON $resources

Weitere ähnliche Inhalte

Was ist angesagt?

HPCS16 - Frederick Lefebvre - Bridging the last mile
HPCS16 - Frederick Lefebvre - Bridging the last mileHPCS16 - Frederick Lefebvre - Bridging the last mile
HPCS16 - Frederick Lefebvre - Bridging the last mile
Frédérick Lefebvre
 

Was ist angesagt? (20)

Caffe + H2O - By Cyprien noel
Caffe + H2O - By Cyprien noelCaffe + H2O - By Cyprien noel
Caffe + H2O - By Cyprien noel
 
Dynamo db and Cross Region Migration
Dynamo db and Cross Region MigrationDynamo db and Cross Region Migration
Dynamo db and Cross Region Migration
 
No sql
No sqlNo sql
No sql
 
Sharding: patterns and antipatterns (Osipov, Rybak, HighLoad'2014)
Sharding: patterns and antipatterns (Osipov, Rybak, HighLoad'2014)Sharding: patterns and antipatterns (Osipov, Rybak, HighLoad'2014)
Sharding: patterns and antipatterns (Osipov, Rybak, HighLoad'2014)
 
Cache options for Data Layer
Cache options for Data LayerCache options for Data Layer
Cache options for Data Layer
 
HPCS16 - Frederick Lefebvre - Bridging the last mile
HPCS16 - Frederick Lefebvre - Bridging the last mileHPCS16 - Frederick Lefebvre - Bridging the last mile
HPCS16 - Frederick Lefebvre - Bridging the last mile
 
Big data should be simple
Big data should be simpleBig data should be simple
Big data should be simple
 
Inside CynosDB: MariaDB optimized for the cloud at Tencent
Inside CynosDB: MariaDB optimized for the cloud at TencentInside CynosDB: MariaDB optimized for the cloud at Tencent
Inside CynosDB: MariaDB optimized for the cloud at Tencent
 
Office Track: Exchange 2013 in the real world - Michael Van Horenbeeck
Office Track: Exchange 2013 in the real world - Michael Van HorenbeeckOffice Track: Exchange 2013 in the real world - Michael Van Horenbeeck
Office Track: Exchange 2013 in the real world - Michael Van Horenbeeck
 
TechEvent Time Seriesd Databases
TechEvent Time Seriesd DatabasesTechEvent Time Seriesd Databases
TechEvent Time Seriesd Databases
 
OpenStreetMap Belarus Tile Server
OpenStreetMap Belarus Tile ServerOpenStreetMap Belarus Tile Server
OpenStreetMap Belarus Tile Server
 
Avoiding Data Hotspots at Scale
Avoiding Data Hotspots at ScaleAvoiding Data Hotspots at Scale
Avoiding Data Hotspots at Scale
 
GlusterD 2.0 - Managing Distributed File System Using a Centralized Store
GlusterD 2.0 - Managing Distributed File System Using a Centralized StoreGlusterD 2.0 - Managing Distributed File System Using a Centralized Store
GlusterD 2.0 - Managing Distributed File System Using a Centralized Store
 
Redis Overview
Redis OverviewRedis Overview
Redis Overview
 
PGConf.ASIA 2019 Bali - IoT and PostgreSQL - Koichi Suzuki
PGConf.ASIA 2019 Bali - IoT and PostgreSQL - Koichi SuzukiPGConf.ASIA 2019 Bali - IoT and PostgreSQL - Koichi Suzuki
PGConf.ASIA 2019 Bali - IoT and PostgreSQL - Koichi Suzuki
 
Reading The Source Code of Presto
Reading The Source Code of PrestoReading The Source Code of Presto
Reading The Source Code of Presto
 
Configuring workload-based storage and topologies
Configuring workload-based storage and topologiesConfiguring workload-based storage and topologies
Configuring workload-based storage and topologies
 
Gluster fs hadoop_fifth-elephant
Gluster fs hadoop_fifth-elephantGluster fs hadoop_fifth-elephant
Gluster fs hadoop_fifth-elephant
 
M|18 Creating a Reference Architecture for High Availability at Nokia
M|18 Creating a Reference Architecture for High Availability at NokiaM|18 Creating a Reference Architecture for High Availability at Nokia
M|18 Creating a Reference Architecture for High Availability at Nokia
 
Tiering barcelona
Tiering barcelonaTiering barcelona
Tiering barcelona
 

Andere mochten auch

Re-Negotiating Narrative: Emergent Storytelling
Re-Negotiating Narrative: Emergent StorytellingRe-Negotiating Narrative: Emergent Storytelling
Re-Negotiating Narrative: Emergent Storytelling
PaleFire
 
This is an interesting metadata source. Can I import it into Koha?
This is an interesting metadata source. Can I import it into Koha?This is an interesting metadata source. Can I import it into Koha?
This is an interesting metadata source. Can I import it into Koha?
Dobrica Pavlinušić
 
One Climate Initiative Sep 2007
One Climate Initiative Sep 2007One Climate Initiative Sep 2007
One Climate Initiative Sep 2007
OneWorld UK
 

Andere mochten auch (20)

Open Education in Virtual Worlds
Open Education in Virtual WorldsOpen Education in Virtual Worlds
Open Education in Virtual Worlds
 
Denk- en discussiedag sept 2010: digitale collectie
Denk- en discussiedag sept 2010: digitale collectieDenk- en discussiedag sept 2010: digitale collectie
Denk- en discussiedag sept 2010: digitale collectie
 
Social Media & Web 2.0 Services for Choirs
Social Media & Web 2.0 Services for ChoirsSocial Media & Web 2.0 Services for Choirs
Social Media & Web 2.0 Services for Choirs
 
Hacktivism in Virtual Worlds
Hacktivism in Virtual WorldsHacktivism in Virtual Worlds
Hacktivism in Virtual Worlds
 
Free Libre Open Source Software at FFZG library
Free Libre Open Source Software at FFZG libraryFree Libre Open Source Software at FFZG library
Free Libre Open Source Software at FFZG library
 
Open Workshop on Information Literacy
Open Workshop on Information LiteracyOpen Workshop on Information Literacy
Open Workshop on Information Literacy
 
The Attack of the Learning Clones
The Attack of the Learning ClonesThe Attack of the Learning Clones
The Attack of the Learning Clones
 
Pubic Diplomacy and Web 2.0
Pubic Diplomacy and Web 2.0Pubic Diplomacy and Web 2.0
Pubic Diplomacy and Web 2.0
 
Re-Negotiating Narrative: Emergent Storytelling
Re-Negotiating Narrative: Emergent StorytellingRe-Negotiating Narrative: Emergent Storytelling
Re-Negotiating Narrative: Emergent Storytelling
 
This is an interesting metadata source. Can I import it into Koha?
This is an interesting metadata source. Can I import it into Koha?This is an interesting metadata source. Can I import it into Koha?
This is an interesting metadata source. Can I import it into Koha?
 
One Climate Initiative Sep 2007
One Climate Initiative Sep 2007One Climate Initiative Sep 2007
One Climate Initiative Sep 2007
 
Virtual Reality Applications in Career Consulting - Potential & Restictions
Virtual Reality Applications in Career Consulting  - Potential & RestictionsVirtual Reality Applications in Career Consulting  - Potential & Restictions
Virtual Reality Applications in Career Consulting - Potential & Restictions
 
Post-relational databases: What's wrong with web development? v3
Post-relational databases: What's wrong with web development? v3Post-relational databases: What's wrong with web development? v3
Post-relational databases: What's wrong with web development? v3
 
Morocco
MoroccoMorocco
Morocco
 
Information Literacy and Smart Life-Long Learning: Knowledge Antidotes in the...
Information Literacy and Smart Life-Long Learning: Knowledge Antidotes in the...Information Literacy and Smart Life-Long Learning: Knowledge Antidotes in the...
Information Literacy and Smart Life-Long Learning: Knowledge Antidotes in the...
 
CTE Teaching and Learning Inst. 2008
CTE Teaching and Learning Inst. 2008CTE Teaching and Learning Inst. 2008
CTE Teaching and Learning Inst. 2008
 
Euronem Zambia 2008
Euronem Zambia 2008Euronem Zambia 2008
Euronem Zambia 2008
 
Intro to Haml
Intro to HamlIntro to Haml
Intro to Haml
 
Χριστούγεννα χωρίς Χριστό
Χριστούγεννα χωρίς ΧριστόΧριστούγεννα χωρίς Χριστό
Χριστούγεννα χωρίς Χριστό
 
Mojo Facets – so, you have data and browser?
Mojo Facets – so, you have data and browser?Mojo Facets – so, you have data and browser?
Mojo Facets – so, you have data and browser?
 

Ähnlich wie Web scale monitoring

Big Data in 200 km/h | AWS Big Data Demystified #1.3
Big Data in 200 km/h | AWS Big Data Demystified #1.3  Big Data in 200 km/h | AWS Big Data Demystified #1.3
Big Data in 200 km/h | AWS Big Data Demystified #1.3
Omid Vahdaty
 
AWS Big Data Demystified #1.2 | Big Data architecture lessons learned
AWS Big Data Demystified #1.2 | Big Data architecture lessons learned AWS Big Data Demystified #1.2 | Big Data architecture lessons learned
AWS Big Data Demystified #1.2 | Big Data architecture lessons learned
Omid Vahdaty
 

Ähnlich wie Web scale monitoring (20)

Big Data in 200 km/h | AWS Big Data Demystified #1.3
Big Data in 200 km/h | AWS Big Data Demystified #1.3  Big Data in 200 km/h | AWS Big Data Demystified #1.3
Big Data in 200 km/h | AWS Big Data Demystified #1.3
 
AWS big-data-demystified #1.1 | Big Data Architecture Lessons Learned | English
AWS big-data-demystified #1.1  | Big Data Architecture Lessons Learned | EnglishAWS big-data-demystified #1.1  | Big Data Architecture Lessons Learned | English
AWS big-data-demystified #1.1 | Big Data Architecture Lessons Learned | English
 
A Journey into Hexagon: Dissecting Qualcomm Basebands
A Journey into Hexagon: Dissecting Qualcomm BasebandsA Journey into Hexagon: Dissecting Qualcomm Basebands
A Journey into Hexagon: Dissecting Qualcomm Basebands
 
PGConf APAC 2018 - High performance json postgre-sql vs. mongodb
PGConf APAC 2018 - High performance json  postgre-sql vs. mongodbPGConf APAC 2018 - High performance json  postgre-sql vs. mongodb
PGConf APAC 2018 - High performance json postgre-sql vs. mongodb
 
Patroni - HA PostgreSQL made easy
Patroni - HA PostgreSQL made easyPatroni - HA PostgreSQL made easy
Patroni - HA PostgreSQL made easy
 
ApacheCon 2022_ Large scale unification of file format.pptx
ApacheCon 2022_ Large scale unification of file format.pptxApacheCon 2022_ Large scale unification of file format.pptx
ApacheCon 2022_ Large scale unification of file format.pptx
 
AWS Big Data Demystified #1: Big data architecture lessons learned
AWS Big Data Demystified #1: Big data architecture lessons learned AWS Big Data Demystified #1: Big data architecture lessons learned
AWS Big Data Demystified #1: Big data architecture lessons learned
 
MariaDB Paris Workshop 2023 - Performance Optimization
MariaDB Paris Workshop 2023 - Performance OptimizationMariaDB Paris Workshop 2023 - Performance Optimization
MariaDB Paris Workshop 2023 - Performance Optimization
 
Application Caching: The Hidden Microservice (SAConf)
Application Caching: The Hidden Microservice (SAConf)Application Caching: The Hidden Microservice (SAConf)
Application Caching: The Hidden Microservice (SAConf)
 
Node.js Web Apps @ ebay scale
Node.js Web Apps @ ebay scaleNode.js Web Apps @ ebay scale
Node.js Web Apps @ ebay scale
 
Migrating to Apache Spark at Netflix
Migrating to Apache Spark at NetflixMigrating to Apache Spark at Netflix
Migrating to Apache Spark at Netflix
 
Data pipelines from zero to solid
Data pipelines from zero to solidData pipelines from zero to solid
Data pipelines from zero to solid
 
Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2
 
NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1
 
Search and fpga
Search and fpgaSearch and fpga
Search and fpga
 
Etl confessions pg conf us 2017
Etl confessions   pg conf us 2017Etl confessions   pg conf us 2017
Etl confessions pg conf us 2017
 
Argus Production Monitoring at Salesforce
Argus Production Monitoring at SalesforceArgus Production Monitoring at Salesforce
Argus Production Monitoring at Salesforce
 
Argus Production Monitoring at Salesforce
Argus Production Monitoring at Salesforce Argus Production Monitoring at Salesforce
Argus Production Monitoring at Salesforce
 
EVCache: Lowering Costs for a Low Latency Cache with RocksDB
EVCache: Lowering Costs for a Low Latency Cache with RocksDBEVCache: Lowering Costs for a Low Latency Cache with RocksDB
EVCache: Lowering Costs for a Low Latency Cache with RocksDB
 
AWS Big Data Demystified #1.2 | Big Data architecture lessons learned
AWS Big Data Demystified #1.2 | Big Data architecture lessons learned AWS Big Data Demystified #1.2 | Big Data architecture lessons learned
AWS Big Data Demystified #1.2 | Big Data architecture lessons learned
 

Mehr von Dobrica Pavlinušić

Virtualization which isn't: LXC (Linux Containers)
Virtualization which isn't: LXC (Linux Containers)Virtualization which isn't: LXC (Linux Containers)
Virtualization which isn't: LXC (Linux Containers)
Dobrica Pavlinušić
 
Slobodni softver za digitalne arhive: EPrints u Knjižnici Filozofskog fakulte...
Slobodni softver za digitalne arhive: EPrints u Knjižnici Filozofskog fakulte...Slobodni softver za digitalne arhive: EPrints u Knjižnici Filozofskog fakulte...
Slobodni softver za digitalne arhive: EPrints u Knjižnici Filozofskog fakulte...
Dobrica Pavlinušić
 
Post-relational databases: What's wrong with web development?
Post-relational databases: What's wrong with web development?Post-relational databases: What's wrong with web development?
Post-relational databases: What's wrong with web development?
Dobrica Pavlinušić
 
Kako napraviti Google od zgrade sa računalima?
Kako napraviti Google od zgrade sa računalima?Kako napraviti Google od zgrade sa računalima?
Kako napraviti Google od zgrade sa računalima?
Dobrica Pavlinušić
 

Mehr von Dobrica Pavlinušić (20)

Mainline kernel on ARM Tegra20 devices that are left behind on 2.6 kernels
Mainline kernel on ARM Tegra20 devices that are left behind on 2.6 kernelsMainline kernel on ARM Tegra20 devices that are left behind on 2.6 kernels
Mainline kernel on ARM Tegra20 devices that are left behind on 2.6 kernels
 
Linux+sensor+device-tree+shell=IoT !
Linux+sensor+device-tree+shell=IoT !Linux+sensor+device-tree+shell=IoT !
Linux+sensor+device-tree+shell=IoT !
 
bro - what is in my network?
bro - what is in my network?bro - what is in my network?
bro - what is in my network?
 
Let's hack cheap hardware 2016 edition
Let's hack cheap hardware 2016 editionLet's hack cheap hardware 2016 edition
Let's hack cheap hardware 2016 edition
 
Raspberry Pi - best friend for all your GPIO needs
Raspberry Pi - best friend for all your GPIO needsRaspberry Pi - best friend for all your GPIO needs
Raspberry Pi - best friend for all your GPIO needs
 
Cheap, good, hackable tools from China: AVR component tester
Cheap, good, hackable tools from China: AVR component testerCheap, good, hackable tools from China: AVR component tester
Cheap, good, hackable tools from China: AVR component tester
 
Ganeti - build your own cloud
Ganeti - build your own cloudGaneti - build your own cloud
Ganeti - build your own cloud
 
FSEC 2014 - I can haz your board with JTAG
FSEC 2014 - I can haz your board with JTAGFSEC 2014 - I can haz your board with JTAG
FSEC 2014 - I can haz your board with JTAG
 
Hardware hacking for software people
Hardware hacking for software peopleHardware hacking for software people
Hardware hacking for software people
 
Gnu linux on arm for $50 - $100
Gnu linux on arm for $50 - $100Gnu linux on arm for $50 - $100
Gnu linux on arm for $50 - $100
 
Security of Linux containers in the cloud
Security of Linux containers in the cloudSecurity of Linux containers in the cloud
Security of Linux containers in the cloud
 
SysAdmin cookbook
SysAdmin cookbookSysAdmin cookbook
SysAdmin cookbook
 
Printing on Linux, simple right?
Printing on Linux, simple right?Printing on Linux, simple right?
Printing on Linux, simple right?
 
KohaCon11: Integrating Koha with RFID system
KohaCon11: Integrating Koha with RFID systemKohaCon11: Integrating Koha with RFID system
KohaCon11: Integrating Koha with RFID system
 
Deploy your own P2P network
Deploy your own P2P networkDeploy your own P2P network
Deploy your own P2P network
 
Virtualization which isn't: LXC (Linux Containers)
Virtualization which isn't: LXC (Linux Containers)Virtualization which isn't: LXC (Linux Containers)
Virtualization which isn't: LXC (Linux Containers)
 
Slobodni softver za digitalne arhive: EPrints u Knjižnici Filozofskog fakulte...
Slobodni softver za digitalne arhive: EPrints u Knjižnici Filozofskog fakulte...Slobodni softver za digitalne arhive: EPrints u Knjižnici Filozofskog fakulte...
Slobodni softver za digitalne arhive: EPrints u Knjižnici Filozofskog fakulte...
 
Post-relational databases: What's wrong with web development?
Post-relational databases: What's wrong with web development?Post-relational databases: What's wrong with web development?
Post-relational databases: What's wrong with web development?
 
Kako napraviti Google od zgrade sa računalima?
Kako napraviti Google od zgrade sa računalima?Kako napraviti Google od zgrade sa računalima?
Kako napraviti Google od zgrade sa računalima?
 
Virtual LDAP - kako natjerati strgane aplikacije da koriste LDAP
Virtual LDAP - kako natjerati strgane aplikacije da koriste LDAPVirtual LDAP - kako natjerati strgane aplikacije da koriste LDAP
Virtual LDAP - kako natjerati strgane aplikacije da koriste LDAP
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

Web scale monitoring

  • 1. Web scale monitoring using gearman, redis, mojolicious, Angular. js, gnuplot and PostgreSQL as NoSQL store Dobrica Pavlinušić http://blog.rot13.org DORS/CLUC 2012
  • 2. Goals ● define problem in terms of scaling ○ Gearman as distributed fork ● don't lock yourself into technological choice ○ relational data database, so what? ● don't mungle and rename data ○ preserve naming through whole stack ● test driven development ○ small iterations, easy deployment ● is your cache really useful? ○ can you make web interface out of it? ● why are web interfaces hard? ○ Angular.js comes to rescue!
  • 3. Project specification ● Existing perl scripts parse telnet output ○ end-users (CPE) ○ equipment in-between (MSAN, DSLAM) ● Create monitoring system! ● Users data split between LDAP and CRM ● Horizontal scalability (on single box!) ○ number of users grow ● Store data in relational database for reporting ○ All collected data is interesting ● Web interface to inspect data ○ prototype http://youtu.be/Cp31xUdyZBQ
  • 4. Proposed architecture ● Gearman as queue server ○ workers collect, process and store data ○ Gearman::Driver fork workers on-demand ● PostgreSQL with hstore ○ don't mungle data - not normalized ○ use views for reporting ○ table inheritance for easy expiry of data ● Redis rich structures for data caching ○ provide "warm" data for Web interface ● Web: mojolicious, Angular.js, gnuplot ○ gearman calls and SQL queries to JSONP
  • 5. Web UI PostgreSQL store Gearm LDAP Redis LDAP an XML/R CRM PC CPE DSLAM MSAN poll *40 34*1-5 40*1-5 *1 ~5300 ~2300 ~1100 15 min pull interval dual-core, 4Gb RAM 130-300 processes cron
  • 7. Queue ● distributed (across cores) on-demand fork ● German::Driver manages workers ○ min, max process limits ○ copy-on-write fork ○ three master processes (services, MSAN, DSLAM) ○ modify process name for status info (ps ax) ● german workers ○ pollers generate timestamp for data (inserts are queued!) ○ one per work (CPE pollers) ○ persistent workers (TCP connection to MSAN/DSLAM is re-used for all work)
  • 8. Cache with structures ● store ○ all data from gearman calls (which are slow) ○ statistics from poll workers ● expire data after poll interval ○ fresh data for web interface ● name your keys in sane way! ○ CPE.*, ZTEMSAN.*, ZTEDSLAM.* (poll stats) ○ CRM.login, LDAP.login ○ table.dslam.login (last row inserted) ○ columns.dslam (existence, needed for Web)
  • 9. hstore ● store key-value pairs (single-level) in single column ● additional columns to support indexes ○ GiST and GIN indexes on hstore are not enough ● table inheritance ○ partitioning of tables by date ○ DELETE and VACUUM can take a long time ○ set sql_inheritance = false ● using PostgreSQL 8.4 (nothing new!) ● PostgreSQL 9.2 will have JSON type support and v8!
  • 10. Web interface ● mojolicious ○ web server and JSON provider ○ MojoX::Gearman ● gnuplot graphs from huge amount of data ○ JavaScript doesn't cut it! ○ get textual data from gearman ○ generate graphs on-the-fly ● Angular.js as nice way to generate HTML from JSON $resources