Contenu connexe Similaire à PuppetDB: One Year Faster - PuppetConf 2014 (20) PuppetDB: One Year Faster - PuppetConf 201443. • Can query facts, nodes,
resources, reports, events,
metrics
• Advanced queries via AST-
based language
• Aggregates, ordering, paging,
streaming, subqueries
45. A long time ago in a galaxy
far, far away…
!
!
uh, like here a year ago…
55. We can’t get through
that entire list, but I’ll try
to highlight a few shiny
bits
63. • Edges and facts, too
• Trades reads for writes,
which is a good tradeoff.
• PostgreSQL’s heap-only-
tuples help a lot.
66. Thanks to the folks at
Spotify, the community,
etc. that helped us with
this!
70. • Restructuring data prior to
hashing results in much
fewer false negatives
• The fastest way to persist
data is to already have it
persisted!
84. • Any reception or
transmission of data now
includes the environment
where possible
• Queries can be isolated to a
single environment
86. PuppetDB
Parse
Map valid
fields
Map valid
operators
Compile to
SQL
PostgreSQL
Parse
Map valid
fields
Map valid
operators
Compile to
SQL
Parse
Map valid
fields
Map valid
operators
Compile to
SQL
Parse
Map valid
fields
Map valid
operators
Compile to
SQL
Facts
Resources
Nodes
Reports
Parse
Map valid
fields
Map valid
operators
Compile to
SQL
Events
QUERY
88. • Common query engine
underpinning v4 API
• Operators are available
uniformly across all v4
endpoints
• We can add new endpoints
and fields much faster
90. {
"cpus" : {
"cpu1" : {
"bogomips": 6000,
}
},
"networking" : {
"eth0" : {
"ipaddresses" : [ "1.1.1.5" ],
"macaddresses" : [ "aa:bb:cc:dd:ee:00" ]
}
}
}