Comments (6)
p.s pretty sure you need to put some warning on the examples withexec('date +%s%N')
it has bad performance.
at least for me in ubuntu 16 this code is taking 1.5158290863037 sec to complete
for($x=0;$x<1000;$x++) {
exec('date +%s%N');
}
from influxdb-php.
Well UDP vs TPC is a very good topic.
UDP is really fast but you have not guarantee about your point, because the protocol have not this kind of check if you are sending CPU point you can not be sure that all your point will be in influxdb.
TPC has this check but it's slow.
I have two different strategy.
-
Are you using a agent on your server to collect local data like telegraf?
In this case you can send udp data to the agent because between your local network the probability to lose package is low and you will send bulk of point via TPC with the collector, in this way your application will be fast. -
You are not using an agent.
In this case depends, if you can not accept to miss points use TCP.
In this article I spoke about another library but there is a bench UDP vs TPC
http://gianarb.it/blog/InfluxDB-and-PHP
from influxdb-php.
@gianarb How to send data to a locally started Telegraf agent?
from influxdb-php.
Hello @akalongman , telegraf has an input plugin called http_listener
https://github.com/influxdata/telegraf/tree/master/plugins/inputs/http_listener_v2
This plugin exposes a compatible API layer with InfluxDB. You can change the client URL to hit the one exposed by the telegraf plugin and everything should just work as before but passing via Telegraf!
from influxdb-php.
@gianarb thank you. Is it possible to use UDP? I do not want to add network overheads on my application
from influxdb-php.
from influxdb-php.
Related Issues (20)
- PhP my Admin HOT 1
- Adding new query methods?
- [Question Only] Is it usable with InfluxDB 2.0 HOT 12
- [Feature request] Parameter Binding HOT 2
- Exception using getPoints on empty metric HOT 3
- Contact request
- Client results differ vs CLI HOT 2
- Can you add a parameter to QueryBuilder->getResultSet() ? HOT 1
- get the return result when save points with curl driver HOT 1
- HTTPS Request, not HTTP
- getResultSet(['epoch' => 's']) HOT 2
- select query with different time format HOT 3
- PHP 8 compatibility HOT 6
- InfluxDB2\FluxRecord getValue() can spit out a PHP “Undefined Index” Notice HOT 1
- Code 500
- Incorrect PRECISION_NANOSECONDS marker
- Can't omit port if running influxdb behind reverse proxy HOT 1
- Isn't 202 a valid status code as well?
- TypeError with php 8.1
- Identify repo owner and move to InfluxCommunity org HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from influxdb-php.