This document discusses setting up an Asterisk cluster with MySQL replication. It describes installing Asterisk and MySQL, configuring Asterisk Realtime Architecture (ARA) to store configurations and dial plans in a MySQL database, and setting up MySQL replication between a master and slave databases to share information across the Asterisk cluster. Key steps include creating MySQL users, tables, and configuring the master and slaves for replication, as well as configuring Asterisk's res_mysql.conf file to connect to the database.
This document provides instructions for setting up different types of MySQL replication architectures:
1) It describes how to configure basic master-slave replication between two servers with step-by-step instructions for configuring the master and slave servers.
2) It also provides a second method for implementing master-slave replication with additional details on configuring the replication user and importing databases.
3) Finally, it outlines how to set up a master-master replication configuration between two MySQL servers to provide high availability, with each server acting as both a master and slave.
Memcached is a high-performance, distributed memory caching system that is used to speed up dynamic web applications by caching objects in memory to reduce database load. It works by storing objects in memory to allow for fast retrieval, improving response times significantly. Major companies that use memcached include Facebook, Yahoo, Amazon, and LiveJournal. It provides features like consistent hashing for object distribution, multithreading, and replication.
Service discovery and configuration provisioningSource Ministry
Slides from our talk "Service discovery and configuration provisioning" presented by Mariusz Gil at PHP Benelux 2016
Apache Zookeeper or Consul are almost completely unknown in the PHP world, although its use solves a lot of typical problems. In a nutshell, they are a central services of provisioning configuration information, distributed synchronization and coordination of servers/processes. It simplifies the processes of application configuration management, so it is possible to change its settings and operation in real time (eg. feature flagging). During the presentation the typical cases of use of Zookeeper/Consul in PHP applications will be presented, both strictly web and workers running from the CLI.
The document discusses MySQL monitoring using various tools and techniques. It covers basic monitoring of system resources and database health using commands like top, mytop and check_mysql. It also discusses advanced monitoring solutions like Nagios plugins, MySQL Activity Report, CACTI and Munin for more in-depth performance and replication monitoring. Specifically, it provides details on using the Nagios check_mysql_health plugin to monitor various MySQL metrics and parameters.
The document discusses MySQL replication, including what it is, the different types of replication like master-slave and master-master, and how to set up replication by configuring the master server, creating a user for replication, and then configuring the slave server to connect to the master. It also covers monitoring replication status on both the master and slave servers through commands like SHOW SLAVE STATUS and SHOW PROCESSLIST.
This document discusses various topics related to installing, configuring, and managing MySQL databases including:
- Using command line tools like mysqladmin and mysql to configure and manage MySQL.
- Installing MySQL via packages or source code and configuring startup settings.
- Creating, deleting, and managing databases, tables, and user privileges.
- Performing backups with mysqldump and restoring from backups.
- Monitoring the status of the MySQL server process.
MySQL is an open-source relational database management system that was created to be very fast, reliable and easy to use. It discusses how to install and configure MySQL, describes basic data management commands like creating databases and tables, inserting and querying data. The document also covers advantages of MySQL like being multi-threaded and some disadvantages like not supporting stored procedures initially.
This document provides instructions for setting up different types of MySQL replication architectures:
1) It describes how to configure basic master-slave replication between two servers with step-by-step instructions for configuring the master and slave servers.
2) It also provides a second method for implementing master-slave replication with additional details on configuring the replication user and importing databases.
3) Finally, it outlines how to set up a master-master replication configuration between two MySQL servers to provide high availability, with each server acting as both a master and slave.
Memcached is a high-performance, distributed memory caching system that is used to speed up dynamic web applications by caching objects in memory to reduce database load. It works by storing objects in memory to allow for fast retrieval, improving response times significantly. Major companies that use memcached include Facebook, Yahoo, Amazon, and LiveJournal. It provides features like consistent hashing for object distribution, multithreading, and replication.
Service discovery and configuration provisioningSource Ministry
Slides from our talk "Service discovery and configuration provisioning" presented by Mariusz Gil at PHP Benelux 2016
Apache Zookeeper or Consul are almost completely unknown in the PHP world, although its use solves a lot of typical problems. In a nutshell, they are a central services of provisioning configuration information, distributed synchronization and coordination of servers/processes. It simplifies the processes of application configuration management, so it is possible to change its settings and operation in real time (eg. feature flagging). During the presentation the typical cases of use of Zookeeper/Consul in PHP applications will be presented, both strictly web and workers running from the CLI.
The document discusses MySQL monitoring using various tools and techniques. It covers basic monitoring of system resources and database health using commands like top, mytop and check_mysql. It also discusses advanced monitoring solutions like Nagios plugins, MySQL Activity Report, CACTI and Munin for more in-depth performance and replication monitoring. Specifically, it provides details on using the Nagios check_mysql_health plugin to monitor various MySQL metrics and parameters.
The document discusses MySQL replication, including what it is, the different types of replication like master-slave and master-master, and how to set up replication by configuring the master server, creating a user for replication, and then configuring the slave server to connect to the master. It also covers monitoring replication status on both the master and slave servers through commands like SHOW SLAVE STATUS and SHOW PROCESSLIST.
This document discusses various topics related to installing, configuring, and managing MySQL databases including:
- Using command line tools like mysqladmin and mysql to configure and manage MySQL.
- Installing MySQL via packages or source code and configuring startup settings.
- Creating, deleting, and managing databases, tables, and user privileges.
- Performing backups with mysqldump and restoring from backups.
- Monitoring the status of the MySQL server process.
MySQL is an open-source relational database management system that was created to be very fast, reliable and easy to use. It discusses how to install and configure MySQL, describes basic data management commands like creating databases and tables, inserting and querying data. The document also covers advantages of MySQL like being multi-threaded and some disadvantages like not supporting stored procedures initially.
Apache Ambari at the Apache Big Data Conference in Miami on May 18, 2017
presented by Alejandro Fernandez
Using Apache Ambari for enterprises with Blueprints, Custom Services, Stack Advisor, Kerberos, Large Scale, Rolling/Express Upgrades, Alerts, Metrics, and Log Search.
Mysql replication allows data to be replicated from a master database server to slave database servers. It works by having the master record all write queries to its binary log which is then used by slaves to replicate the same queries. Replication can be synchronous for high data integrity or asynchronous for higher performance. Configuring replication involves setting up a replication user on the master, enabling binary logging, taking a snapshot of data, and configuring the slaves to connect to the master and replay the binary logs.
Talk given by David Peterson, Lead Systems Engineer at Salesforce, at StackiFest in March 2016
Enterprise bare metal provisioning using Stacki at Salesforce/Pardot and how we've configured it in our environment. It used to take the Ops teams hours to do end-to-end provisioning with chef integration to now it takes about 15 minutes with it all being automated. In this presentation, I will discuss:
- Why we chose Stacki
- Hardware and provisioning requirements
- Stacki configuration with chef integration
- ZFS and data safe re-provisioning
- Detecting issues and adhoc reporting
This document contains examples of using Puppet code to configure different types of infrastructure components including Apache, PHP, MySQL, firewalls, monitoring tools, and more. It shows how to define dependencies between components, use feature toggles, handle different operating systems, and compare versions to configure alternatives.
Secure our data is a complex topic. We can build a very strong protection around our data, but nothing will prevent the one WHO could potentially access it to compromise the data integrity or to expose it.
This because we either under estimate the control we can or should impose, or because we think to do not have the tools to perform such control.
Nowadays to be able to control and manage what can access our data is a must, while how to do with standard tools it is a nightmare.
The presentation will guide you in a journey, there you will discover how implementing a quite robust protection, more than what you thought was possible.
Even more, it is possible and your performances will even improve. Cool right?
We will discuss:
- Access using not standard port
- Implement selective query access
- Define accessibility by location/ip/id
- Reduce to minimum cost of filtering
- Automate the query discovery
A talk I gave at the recent Advanced AWS Meeup - this is a detailed guide to how I installed and set up Spinnaker to work with our infrastructure at Stitch Fix. I go over the various problems I ran into and how I solved them. I hope this can be useful for others setting up, or interested in setting up Spinnaker for their purposes.
**Big thanks to Armory for recording the talks! Video for this talk can be found here: https://youtu.be/ywzPblFpIE0 (I'm the second speaker)**
Bare Metal to OpenStack with Razor and ChefMatt Ray
Razor is an open source provisioning tool that was originally developed by EMC and Puppet Labs. It can discover hardware, select images to deploy, and provision nodes using model-based provisioning. The demo showed setting up a Razor appliance, adding images, models, policies, and brokers. It then deployed an OpenStack all-in-one environment to a new VM using Razor and Chef. The OpenStack cookbook walkthrough explained the roles, environments, and cookbooks used to deploy and configure OpenStack components using Chef.
The document discusses setting up MySQL high availability using InnoDB Cluster. It provides instructions for installing MySQL 8.0, configuring three MySQL instances for the cluster, creating the cluster, and running the MySQL Router for load balancing and failover. The Router is configured to route reads from two read-only slaves, while writes go to a single read-write master. Connections are tested from each instance to verify the Router is load balancing correctly.
StackKicker is a tool that allows users to easily and repeatedly build out application stacks in cloud environments like AWS and OpenStack. It defines stacks as configurations that specify the roles, nodes, regions/availability zones, and other details needed to provision the stack. StackKicker leverages configuration management tools like Chef and Puppet to build out the defined stacks across different cloud regions and environments in an automated and repeatable way.
This document summarizes a MySQL Meetup that took place on September 8th, 2014. It includes the agenda for the meetup which involved registration, a speaker presentation on quick performance checks, and a networking session. The speaker Wayne Leutwyler presented on useful views for checking database performance and provided thresholds and recommendations for optimizing various MySQL variables if certain metrics were not within acceptable ranges. The document also briefly discussed some command line tools for system monitoring and ended by thanking the event sponsors.
Intrusion Detection System using Snort webhostingguy
This document summarizes the installation and configuration of an intrusion detection system using the open source tools Snort, MySQL, Apache web server, PHP, ACID, SAM, and SNOT. It provides step-by-step instructions for installing each component, configuring them to work together, and testing the system using SNOT to generate attack packets that can be monitored through the SAM and ACID interfaces.
Intrusion Detection System using Snort webhostingguy
This document summarizes the installation and configuration of an intrusion detection system using the open source tools Snort, MySQL, Apache web server, PHP, ACID, SAM, and SNOT. It provides step-by-step instructions for installing each component, configuring them to work together, and testing the system using SNOT to generate attack packets that can be monitored through the SAM and ACID interfaces.
Facebook uses caching at multiple levels to improve performance and scalability. Caching is implemented globally, with APC, Memcached, and browser caches. Memcached is used to cache user profiles, photos, friends lists, and other frequently accessed data. Caching is optimized through techniques like caching serialization formats, priming APC, and caching parsed user agent strings. Dirty caching ensures cached data is invalidated when the source data changes.
This document discusses the setup and architecture of a MySQL Spider configuration. It describes installing multiple MySQL instances on a single server, including 4 MariaDB 10.1 nodes and 6 MySQL 5.7 nodes. It then configures the Spider storage engine to partition tables across these nodes for both data sharding and high availability. Key steps include defining servers, creating federated tables, and testing data is replicated correctly across nodes. The architecture provides both data sharding and high availability through table partitioning and failure recovery mechanisms.
This document discusses the setup and architecture of a MySQL Spider configuration. It describes installing multiple MySQL instances on a single server, including 4 MariaDB 10.1 nodes and 6 MySQL 5.7 nodes. It then configures the Spider storage engine to partition tables across these nodes for both data sharding and high availability. Examples are provided of creating servers, tables, and inserting/selecting data to demonstrate the federated and sharded architecture.
ProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdfJesmar Cannao'
ProxySQL is a MySQL protocol proxy that provides high availability, scalability, and security for MySQL database systems. It allows clients to connect to ProxySQL, which then evaluates requests and performs actions like routing queries to backend databases, caching reads, connection pooling, and load balancing across servers. ProxySQL's main features include query routing, firewalling, real-time statistics, monitoring, and management of large numbers of backend servers. The presentation discusses using ProxySQL's query routing and rewriting capabilities to mask sensitive data when replicating databases for development environments. It also covers using the REST API and Prometheus integration to configure ProxySQL and monitor metrics without direct SQL access.
This document provides instructions for setting up a TrinityCore private server on Linux. It discusses downloading and compiling TrinityCore source code, configuring the required MySQL databases, and basic server configuration. Key steps include installing prerequisites like build tools and libraries, cloning the TrinityCore source repository, running cmake to configure the build, importing SQL files to set up the auth, characters, and world databases, and editing the realmlist table to point clients to the server.
This document summarizes how to configure networking on CentOS including connecting to a network with NetworkManager, setting up local area networks, checking Ethernet connectivity, monitoring network traffic with Wireshark, setting up an Apache web server, monitoring server activities with Apache logs, installing and configuring a MySQL database server, and opening firewall ports for services. Key steps include installing NetworkManager, configuring TCP/IP, using ifconfig to check Ethernet status, starting httpd and MySQL servers, creating MySQL databases and tables, and granting user access to MySQL databases.
Apache Cassandra, part 3 – machinery, work with CassandraAndrey Lomakin
Aim of this presentation to provide enough information for enterprise architect to choose whether Cassandra will be project data store. Presentation describes each nuance of Cassandra architecture and ways to design data and work with them.
WebRTC allows for high quality secure real-time voice and video communication directly in the browser without plugins. It offers key benefits for users like context-based communication, permission-based access, and security. WebRTC can improve the customer experience for businesses by making communication more seamless across channels. One vision is a "C-Button" that allows instant free audio and video calls directly in the browser. This could be used by websites and social networks to enrich customer service with video. WebRTC creates new opportunities for businesses to improve customer satisfaction through more engaging communication.
Apache Ambari at the Apache Big Data Conference in Miami on May 18, 2017
presented by Alejandro Fernandez
Using Apache Ambari for enterprises with Blueprints, Custom Services, Stack Advisor, Kerberos, Large Scale, Rolling/Express Upgrades, Alerts, Metrics, and Log Search.
Mysql replication allows data to be replicated from a master database server to slave database servers. It works by having the master record all write queries to its binary log which is then used by slaves to replicate the same queries. Replication can be synchronous for high data integrity or asynchronous for higher performance. Configuring replication involves setting up a replication user on the master, enabling binary logging, taking a snapshot of data, and configuring the slaves to connect to the master and replay the binary logs.
Talk given by David Peterson, Lead Systems Engineer at Salesforce, at StackiFest in March 2016
Enterprise bare metal provisioning using Stacki at Salesforce/Pardot and how we've configured it in our environment. It used to take the Ops teams hours to do end-to-end provisioning with chef integration to now it takes about 15 minutes with it all being automated. In this presentation, I will discuss:
- Why we chose Stacki
- Hardware and provisioning requirements
- Stacki configuration with chef integration
- ZFS and data safe re-provisioning
- Detecting issues and adhoc reporting
This document contains examples of using Puppet code to configure different types of infrastructure components including Apache, PHP, MySQL, firewalls, monitoring tools, and more. It shows how to define dependencies between components, use feature toggles, handle different operating systems, and compare versions to configure alternatives.
Secure our data is a complex topic. We can build a very strong protection around our data, but nothing will prevent the one WHO could potentially access it to compromise the data integrity or to expose it.
This because we either under estimate the control we can or should impose, or because we think to do not have the tools to perform such control.
Nowadays to be able to control and manage what can access our data is a must, while how to do with standard tools it is a nightmare.
The presentation will guide you in a journey, there you will discover how implementing a quite robust protection, more than what you thought was possible.
Even more, it is possible and your performances will even improve. Cool right?
We will discuss:
- Access using not standard port
- Implement selective query access
- Define accessibility by location/ip/id
- Reduce to minimum cost of filtering
- Automate the query discovery
A talk I gave at the recent Advanced AWS Meeup - this is a detailed guide to how I installed and set up Spinnaker to work with our infrastructure at Stitch Fix. I go over the various problems I ran into and how I solved them. I hope this can be useful for others setting up, or interested in setting up Spinnaker for their purposes.
**Big thanks to Armory for recording the talks! Video for this talk can be found here: https://youtu.be/ywzPblFpIE0 (I'm the second speaker)**
Bare Metal to OpenStack with Razor and ChefMatt Ray
Razor is an open source provisioning tool that was originally developed by EMC and Puppet Labs. It can discover hardware, select images to deploy, and provision nodes using model-based provisioning. The demo showed setting up a Razor appliance, adding images, models, policies, and brokers. It then deployed an OpenStack all-in-one environment to a new VM using Razor and Chef. The OpenStack cookbook walkthrough explained the roles, environments, and cookbooks used to deploy and configure OpenStack components using Chef.
The document discusses setting up MySQL high availability using InnoDB Cluster. It provides instructions for installing MySQL 8.0, configuring three MySQL instances for the cluster, creating the cluster, and running the MySQL Router for load balancing and failover. The Router is configured to route reads from two read-only slaves, while writes go to a single read-write master. Connections are tested from each instance to verify the Router is load balancing correctly.
StackKicker is a tool that allows users to easily and repeatedly build out application stacks in cloud environments like AWS and OpenStack. It defines stacks as configurations that specify the roles, nodes, regions/availability zones, and other details needed to provision the stack. StackKicker leverages configuration management tools like Chef and Puppet to build out the defined stacks across different cloud regions and environments in an automated and repeatable way.
This document summarizes a MySQL Meetup that took place on September 8th, 2014. It includes the agenda for the meetup which involved registration, a speaker presentation on quick performance checks, and a networking session. The speaker Wayne Leutwyler presented on useful views for checking database performance and provided thresholds and recommendations for optimizing various MySQL variables if certain metrics were not within acceptable ranges. The document also briefly discussed some command line tools for system monitoring and ended by thanking the event sponsors.
Intrusion Detection System using Snort webhostingguy
This document summarizes the installation and configuration of an intrusion detection system using the open source tools Snort, MySQL, Apache web server, PHP, ACID, SAM, and SNOT. It provides step-by-step instructions for installing each component, configuring them to work together, and testing the system using SNOT to generate attack packets that can be monitored through the SAM and ACID interfaces.
Intrusion Detection System using Snort webhostingguy
This document summarizes the installation and configuration of an intrusion detection system using the open source tools Snort, MySQL, Apache web server, PHP, ACID, SAM, and SNOT. It provides step-by-step instructions for installing each component, configuring them to work together, and testing the system using SNOT to generate attack packets that can be monitored through the SAM and ACID interfaces.
Facebook uses caching at multiple levels to improve performance and scalability. Caching is implemented globally, with APC, Memcached, and browser caches. Memcached is used to cache user profiles, photos, friends lists, and other frequently accessed data. Caching is optimized through techniques like caching serialization formats, priming APC, and caching parsed user agent strings. Dirty caching ensures cached data is invalidated when the source data changes.
This document discusses the setup and architecture of a MySQL Spider configuration. It describes installing multiple MySQL instances on a single server, including 4 MariaDB 10.1 nodes and 6 MySQL 5.7 nodes. It then configures the Spider storage engine to partition tables across these nodes for both data sharding and high availability. Key steps include defining servers, creating federated tables, and testing data is replicated correctly across nodes. The architecture provides both data sharding and high availability through table partitioning and failure recovery mechanisms.
This document discusses the setup and architecture of a MySQL Spider configuration. It describes installing multiple MySQL instances on a single server, including 4 MariaDB 10.1 nodes and 6 MySQL 5.7 nodes. It then configures the Spider storage engine to partition tables across these nodes for both data sharding and high availability. Examples are provided of creating servers, tables, and inserting/selecting data to demonstrate the federated and sharded architecture.
ProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdfJesmar Cannao'
ProxySQL is a MySQL protocol proxy that provides high availability, scalability, and security for MySQL database systems. It allows clients to connect to ProxySQL, which then evaluates requests and performs actions like routing queries to backend databases, caching reads, connection pooling, and load balancing across servers. ProxySQL's main features include query routing, firewalling, real-time statistics, monitoring, and management of large numbers of backend servers. The presentation discusses using ProxySQL's query routing and rewriting capabilities to mask sensitive data when replicating databases for development environments. It also covers using the REST API and Prometheus integration to configure ProxySQL and monitor metrics without direct SQL access.
This document provides instructions for setting up a TrinityCore private server on Linux. It discusses downloading and compiling TrinityCore source code, configuring the required MySQL databases, and basic server configuration. Key steps include installing prerequisites like build tools and libraries, cloning the TrinityCore source repository, running cmake to configure the build, importing SQL files to set up the auth, characters, and world databases, and editing the realmlist table to point clients to the server.
This document summarizes how to configure networking on CentOS including connecting to a network with NetworkManager, setting up local area networks, checking Ethernet connectivity, monitoring network traffic with Wireshark, setting up an Apache web server, monitoring server activities with Apache logs, installing and configuring a MySQL database server, and opening firewall ports for services. Key steps include installing NetworkManager, configuring TCP/IP, using ifconfig to check Ethernet status, starting httpd and MySQL servers, creating MySQL databases and tables, and granting user access to MySQL databases.
Apache Cassandra, part 3 – machinery, work with CassandraAndrey Lomakin
Aim of this presentation to provide enough information for enterprise architect to choose whether Cassandra will be project data store. Presentation describes each nuance of Cassandra architecture and ways to design data and work with them.
Similar to Asterisk_MySQL_Cluster_Presentation.pdf (20)
WebRTC allows for high quality secure real-time voice and video communication directly in the browser without plugins. It offers key benefits for users like context-based communication, permission-based access, and security. WebRTC can improve the customer experience for businesses by making communication more seamless across channels. One vision is a "C-Button" that allows instant free audio and video calls directly in the browser. This could be used by websites and social networks to enrich customer service with video. WebRTC creates new opportunities for businesses to improve customer satisfaction through more engaging communication.
Asterisk es un sistema de comunicaciones abierto y gratuito que funciona como central telefónica virtual (PBX). Ofrece funciones tradicionales de PBX como enrutamiento de llamadas, buzones de voz, conferencias y más. Además soporta protocolos de voz sobre IP como SIP, IAX y H.323. Se ejecuta en sistemas GNU/Linux, BSD y Mac OS X y es ampliamente utilizado por empresas e individuos.
Build applications with generative AI on Google CloudMárton Kodok
We will explore Vertex AI - Model Garden powered experiences, we are going to learn more about the integration of these generative AI APIs. We are going to see in action what the Gemini family of generative models are for developers to build and deploy AI-driven applications. Vertex AI includes a suite of foundation models, these are referred to as the PaLM and Gemini family of generative ai models, and they come in different versions. We are going to cover how to use via API to: - execute prompts in text and chat - cover multimodal use cases with image prompts. - finetune and distill to improve knowledge domains - run function calls with foundation models to optimize them for specific tasks. At the end of the session, developers will understand how to innovate with generative AI and develop apps using the generative ai industry trends.
Orchestrating the Future: Navigating Today's Data Workflow Challenges with Ai...Kaxil Naik
Navigating today's data landscape isn't just about managing workflows; it's about strategically propelling your business forward. Apache Airflow has stood out as the benchmark in this arena, driving data orchestration forward since its early days. As we dive into the complexities of our current data-rich environment, where the sheer volume of information and its timely, accurate processing are crucial for AI and ML applications, the role of Airflow has never been more critical.
In my journey as the Senior Engineering Director and a pivotal member of Apache Airflow's Project Management Committee (PMC), I've witnessed Airflow transform data handling, making agility and insight the norm in an ever-evolving digital space. At Astronomer, our collaboration with leading AI & ML teams worldwide has not only tested but also proven Airflow's mettle in delivering data reliably and efficiently—data that now powers not just insights but core business functions.
This session is a deep dive into the essence of Airflow's success. We'll trace its evolution from a budding project to the backbone of data orchestration it is today, constantly adapting to meet the next wave of data challenges, including those brought on by Generative AI. It's this forward-thinking adaptability that keeps Airflow at the forefront of innovation, ready for whatever comes next.
The ever-growing demands of AI and ML applications have ushered in an era where sophisticated data management isn't a luxury—it's a necessity. Airflow's innate flexibility and scalability are what makes it indispensable in managing the intricate workflows of today, especially those involving Large Language Models (LLMs).
This talk isn't just a rundown of Airflow's features; it's about harnessing these capabilities to turn your data workflows into a strategic asset. Together, we'll explore how Airflow remains at the cutting edge of data orchestration, ensuring your organization is not just keeping pace but setting the pace in a data-driven future.
Session in https://budapestdata.hu/2024/04/kaxil-naik-astronomer-io/ | https://dataml24.sessionize.com/session/667627
Open Source Contributions to Postgres: The Basics POSETTE 2024ElizabethGarrettChri
Postgres is the most advanced open-source database in the world and it's supported by a community, not a single company. So how does this work? How does code actually get into Postgres? I recently had a patch submitted and committed and I want to share what I learned in that process. I’ll give you an overview of Postgres versions and how the underlying project codebase functions. I’ll also show you the process for submitting a patch and getting that tested and committed.
Predictably Improve Your B2B Tech Company's Performance by Leveraging DataKiwi Creative
Harness the power of AI-backed reports, benchmarking and data analysis to predict trends and detect anomalies in your marketing efforts.
Peter Caputa, CEO at Databox, reveals how you can discover the strategies and tools to increase your growth rate (and margins!).
From metrics to track to data habits to pick up, enhance your reporting for powerful insights to improve your B2B tech company's marketing.
- - -
This is the webinar recording from the June 2024 HubSpot User Group (HUG) for B2B Technology USA.
Watch the video recording at https://youtu.be/5vjwGfPN9lw
Sign up for future HUG events at https://events.hubspot.com/b2b-technology-usa/
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...sameer shah
"Join us for STATATHON, a dynamic 2-day event dedicated to exploring statistical knowledge and its real-world applications. From theory to practice, participants engage in intensive learning sessions, workshops, and challenges, fostering a deeper understanding of statistical methodologies and their significance in various fields."
2. Presentation Overview
¬ Reasons to cluster Asterisk
– Load distribution
– Scalability
¬ This presentation focuses on
– Asterisk Realtime Architecture
– MySQL Replication
3. Asterisk Realtime Architecture (ARA)
¬ ARA allows Asterisk to store configs and dial
plan in a database
¬ Two modes of operation, Static and Realtime
¬ Static allows config file storage, sip.conf, etc…
¬ Realtime dynamically loads and updates objects
– SIP Peers
– Dial Plan
– Voicemail boxes
4. ARA Benefits
¬ Share SIP peer authentication across cluster
– SIP peer may register with registration server 1 or 2,
the authentication information is pulled from the
database and is known to both servers
¬ Share dial plan across cluster of Asterisk servers
– dial plan is read from the database so regardless of
which server a SIP peer registers with, the same call
pattern is used
5. Realtime Database
¬ MySQL, database engine stores the tables and
records
¬ Database will contain 3 basic tables
– sip, SIP peer authentication info
– extensions, dial plan
– voicemail, voicemail boxes with options
6. MySQL Replication
¬ Master database is a central point for database
manipulation, adds, moves, changes
¬ Changes are broadcast all slave databases
¬ All the Asterisk servers in the cluster have the
same database information
¬ Replication occurs sub-second
¬ Replication works through a one-way, log
shipping, asynchronous mechanism
¬ One server is designated as a Master and one or
more servers are designated as Slaves
7. MySQL Replication (cont)
¬ As the Master receives updates, those changes
are propagated to the slaves via a log file then
executed
¬ Slaves have the same data as the Master
¬ No numerical limit to number of slaves
¬ MySQL recommends no more than 20 slaves
¬ Multiple masters used to feed more slaves
8. Why Use Replication?
¬ Fundamental reason is performance
¬ Asterisk must read every extension from the database
¬ Asterisk write activity is low compared to read activity
¬ Reads are performed for every step in call flow
¬ Asterisk reads locally on the host server
¬ Decreases network load and speeds data access time
¬ Added benefit, all service nodes have same data
¬ Master database failure, service nodes still operate
¬ Service node failure doesn’t effect overall operation
10. ARA and MySQL Replication Setup
¬ The sequence of events will be as follows:
¬ Install Asterisk
¬ Install MySQL
¬ Install Asterisk addons with patch 5881 applied
¬ Setup MySQL users
¬ Setup MySQL database and tables
¬ Configure MySQL replication master
¬ Configure MySQL replication slaves
¬ Configure res_mysql.conf
¬ Configure extconfig.conf
11. Install Asterisk
¬ ARA officially implemented in Asterisk 1.2
¬ Asterisk stable release can be downloaded from
the Digium FTP site or testing release
downloaded from SVN
¬ Installation guides can be found at:
http://www.voip-info.org/wiki-Asterisk+installation+tips
12. Install MySQL
¬ Most Linux distributions have pre-built packages
that can be installed from a package manager
¬ Source can be downloaded from MySQL and
compiled locally
http://dev.mysql.com/downloads/mysql/5.0.html
¬ **NOTE: MySQL replication requires MySQL 3.23
and above.
13. Install * Addons with Patch 5881
¬ Res_MySQL module enables ARA to communicate with MySQL
¬ Module is in the asterisk_addon package download from Digium
ftp://ftp.digium.com
¬ Stable package only allows one read/write database definition
¬ You will need a patch downloaded from
http://bugs.digium.com/view.php?id=5881
¬ Patch allows module to read and write to a separate servers
¬ **NOTE: The patch is committed to SVN, will be in stable * 1.6
¬ After applying patch, install addons, make, make install
¬ Copy the res_config.conf example file to /etc/asterisk
¬ Restart Asterisk so the module will be loaded
14. Setup MySQL Users
¬ Log into MySQL: # mysql -u root
¬ Switch to the mysql database: mysql> use mysql
¬ View existing users: mysql> select * from userG;
¬ Set root password:
– mysql> SET PASSWORD FOR root@localhost=PASSWORD('new_password');
¬ Create a regular user:
– INSERT INTO user
– values('%','asteriskdb',password('asterisk123'),
– 'Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N');
¬ **Note: This is for MySQL 3.23, more fields are needed for newer
versions, on-line MySQL documentation manual for newer version
syntax: http://dev.mysql.com/doc/#refman
¬ Create a slave:
– insert into user
– values('%','asteriskslave',password('asteriskslave123'),
– 'Y','N','N','N','N','N','Y','N','Y','Y','Y','N','N','N');
¬ Enable new users: mysql> flush privileges;
15. Setup Database and Tables
¬ Create database on master and slave servers
¬ Only create tables on the master server
¬ MySQL command will pull over tables from
master
¬ Log into MySQL, create the database:
– mysql> CREATE database asteriskdb;
¬ Display the databases:
– mysql> show databases;
¬ Select the new database to add the tables:
– mysql> use asteriskdb
16. Extensions Table
CREATE TABLE `extensions` (
`id` int(11) NOT NULL auto_increment,
`context` varchar(20) NOT NULL default '',
`exten` varchar(20) NOT NULL default '',
`priority` tinyint(4) NOT NULL default '0',
`app` varchar(20) NOT NULL default '',
`appdata` varchar(128) NOT NULL default '',
`accountcode` varchar(20) default NULL,
`notes` varchar(255) default NULL,
PRIMARY KEY (`context`,`exten`,`priority`),
KEY `id` (`id`)
) TYPE=MyISAM;
17. Voicemail Table
CREATE TABLE `voicemail` (
`uniqueid` int(11) NOT NULL auto_increment,
`customer_id` varchar(11) NOT NULL default '0',
`context` varchar(50) NOT NULL default '',
`mailbox` varchar(11) NOT NULL default '0',
`password` varchar(5) NOT NULL default '0',
`fullname` varchar(150) NOT NULL default '',
`email` varchar(50) NOT NULL default '',
`pager` varchar(50) NOT NULL default '',
`tz` varchar(10) NOT NULL default 'central',
`attach` varchar(4) NOT NULL default 'yes',
`saycid` varchar(4) NOT NULL default 'yes',
`dialout` varchar(10) NOT NULL default '',
`callback` varchar(10) NOT NULL default '',
`review` varchar(4) NOT NULL default 'no',
`operator` varchar(4) NOT NULL default 'no',
`envelope` varchar(4) NOT NULL default 'no',
`sayduration` varchar(4) NOT NULL default 'no',
`saydurationm` tinyint(4) NOT NULL default '1',
`sendvoicemail` varchar(4) NOT NULL default 'no',
`delete` varchar(4) NOT NULL default 'no',
`nextaftercmd` varchar(4) NOT NULL default 'yes',
`forcename` varchar(4) NOT NULL default 'no',
`forcegreetings` varchar(4) NOT NULL default 'no',
`hidefromdir` varchar(4) NOT NULL default 'yes',
PRIMARY KEY (`uniqueid`),
KEY `mailbox_context` (`mailbox`,`context`)
) TYPE=MyISAM;
**NOTE: `uniqueid` field name must remain for password updates to work properly
20. Setup Replication on Master
¬ Edit the /etc/mysql/my.cnf file with these parameters:
¬ Under the [mysqld] profile:
¬ Comment out
– #skip-networking
¬ Enable replication, add these lines:
– server-id=1
– log-bin=/var/log/mysql/mysql-bin.log
– binlog-do-db=asteriskdb
¬ The master server should always have a server-id=1
¬ log-bin sets location of replication bin files
¬ bin-log-db sets database to replicate
¬ Restart MySQL so the new changes take affect:
– # /etc/init.d/mysql restart
¬ Access database via MySQL database administrator utility
– MySQL Administrator, SQLyog, EMS SQL Manager for MySQL, Webmin,
phpMyAdmin, many other programs
21. Setup Replication on Slaves
¬ Configure the /etc/mysql/my.cnf file:
¬ Under the [mysqld] profile:
– server-id=2
– master-host=10.10.10.10
– master-user=asteriskslave
– master-password=asteriskslave123
– master-connect-retry=60
– replicate-do-db=asteriskdb
¬ The server-id has to be a unique number for each server.
¬ Restart MySQL so the changes take affect: # /etc/init.d/mysql restart
¬ Log into MySQL on the server: # mysql -u asteriskdb –p
(password=asteriskdb123)
¬ mysql> use asteriskdb
¬ mysql> load table sip from master;
¬ mysql> load table extensions from master;
¬ mysql> load table voicemail from master;
¬ mysql> show tables;
¬ mysql> show master statusG;
¬ mysql> show slave statusG;
¬ http://www.voip-info.org/wiki-Asterisk+RealTime
22. Setup res_mysql.conf
¬ Configure /etc/asterisk/res_mysql.conf
– [general]
– dbname=asteriskdb
– dbuser=asteriskdb
– dbpass=asteriskdb123
– dbport = 3306
– dbsock = /tmp/mysql.sock
– [read]
– dbhost = 127.0.0.1
– [write]
– dbhost = 10.10.10.1
¬ General section, info that spans both read and write databases
¬ Read section points to localhost database
– **NOTE: dbhost=localhost does not work, must use 127.0.0.1
¬ Write section points to master database
23. Setup extconfig.conf
¬ Edit /etc/asterisk/extconfig.conf
– [settings]
– extensions => mysql,asteriskdb,extensions
– sipusers => mysql,asteriskdb,sip
– sippeers => mysql,asteriskdb,sip
– voicemail => mysql,astriskdb,voicemail
¬ extensions is the mapping for the dialplan
¬ sipusers and sippeers is the mapping for SIP devices
¬ voicemail is the mapping for the voicemail system
¬ mysql is the driver
¬ asteriskdb is the database name
¬ Last parameter is the table name
24. ARA and MySQL Replication is Setup
¬ In extensions.conf, you must have a pseudo [context]
with a switch statement to access the database:
– switch => Realtime/[context]@[family]
– [default]
– switch => Realtime/@
¬ If context is left off, then it defaults to context name
where the switch statement is, in this case [default]
¬ If family is left off, it defaults to [extensions]
¬ Above switch statement is the same as:
– switch => Realtime/default@extensions
25. Operational Examples
¬ SIP device registers with Asterisk
¬ Asterisk gathers IP Address and Port number
¬ Asterisk writes to master database, ‘sip’ table
¬ The fields populated are ‘ipaddr’ and ‘port’
¬ This data propagates to all slaves
¬ Each server in cluster can contact SIP device
¬ Dial plan uses RealTime application to contact
SIP device directly
26. Realtime Application
lab1*CLI> show application RealTime
-= Info about application 'RealTime' =-
[Synopsis]
Realtime Data Lookup
[Description]
Use the RealTime config handler system to read data into channel
variables.
RealTime(<family>|<colmatch>|<value>[|<prefix>])
All unique column names will be set as channel variables with
optional prefix to the name.
e.g. prefix of 'var_' would make the column 'name' become the
variable ${var_name}
28. RealTimeUpdate Application
lab1*CLI> show application RealTimeUpdate
-= Info about application 'RealTimeUpdate' =-
[Synopsis]
Realtime Data Rewrite
[Description]
Use the RealTime config handler system to update a value
RealTimeUpdate(<family>|<colmatch>|<value>|<newcol>|<newval>)
The column <newcol> in 'family' matching column <colmatch>=<value>
will be updated to <newval>
30. Use Updated Data Example
WaitExten
8
s
company-a
company-a
BackGround
7
s
company-a
TIMEOUT(response)=2
Set
6
s
company-a
TIMEOUT(digit)=2
Set
5
s
company-a
1
Wait
4
s
company-a
Answer
3
s
company-a
$["${OC_appdata}" = "on" ]?company-a_closed|s|1
GotoIf
2
s
company-a
extensions|app|company-a|OC_
RealTime
1
s
company-a
appdata
App
priority
exten
Context
•Auto Attendent Check if Office is Closed “on” or “off”
31. RealTime Database Syntax
¬ ARA can not parse ‘,’ (commas)
¬ ‘,’ in database used for end-of-field
¬ ‘appdata’ fields must contain ‘|’ (pipes)
¬ In extensions.conf:
[default]
exten => 1001,1,Dial(SIP/1001,20,tr)
¬ In Database:
SIP/1001|20|tr
Dial
1
1001
Default
appdata
app
priority
exten
context
32. MySQL Replication versus Clustering
¬ Implementation expense is higher with clustering
– Need Data nodes, SQL node and Management node
– For data integrity, multiple data nodes are needed
– MySQL Clustering prior to 5.1 requires all data reside in RAM
– Setup and operation of cluster is more difficult than replication
¬ Cluster network usage much higher than replication
– ARA constantly reading data from the database
– SQL reads from Asterisk servers are across network
– SQL node queries retrieved across network from Data nodes
– It’s possible to setup Asterisk servers as SQL nodes, but reads
still traverse network from SQL node to Data nodes
33. Authenticate LD Calls via Database
¬ Asterisk Authenticate application is a great tool
¬ Prohibit long distance dialing unless PIN code entered
¬ Application reads PIN codes from file on local PBX
¬ Updates CDR(accountcode) field with PIN Code
¬ In a cluster arrangement, with dynamic SIP peers
authentication becomes a challenge
¬ Maintaining up to date files with PIN codes on each
registration server is not a good solution
¬ Read PIN codes from database using ARA
– Create customer interface to pin database
– PIN codes are known across the cluster
– No editing flat files on each server
– PIN put in CDR(userfield) not accountcode
– It’s just cool
34. Create PIN Table on Master DB
¬ Log into MySQL master database, select asteriskdb
– # mysql -u root –p (enter root password
mysql> use asteriskdb
CREATE TABLE `pins` (
`id` int(11) NOT NULL auto_increment,
`company` varchar(20) NOT NULL default '',
`pin` varchar(10) NOT NULL default '',
`active` varchar(5) NOT NULL default 'no',
`accountcode` varchar(20) NOT NULL default '',
`notes` varchar(255) default NULL,
PRIMARY KEY (`company`,`pin`),
KEY `id` (`id`)
) TYPE=MyISAM;
35. Pull PIN Table Over to Slaves
¬ Log into slave servers, pull over new table
# mysql -u asteriskdb –p (password asteriskdb123)
mysql> use asteriskdb
mysql> load table pins from master;
¬ Add the following to /etc/asterisk/extconfig.conf
pins => mysql,asteriskdb,pins
¬ Reload extconfig from the asterisk console so the new
table mapping is activated:
¬ asterisk*CLI> reload extconfig
¬ Add PIN codes to the master database:
1111
yes
1111-1234
Company-a
accountcode
active
pin
company
37. Summary
¬ Asterisk is great
¬ MySQL is great
¬ Put them together
¬ All of your dreams can come true!
¬ Thank You!
– JR Richardson
– Engineering for the Masses
– hubguru@gmail.com