Closed Bug 1543612 Opened 5 years ago Closed 4 years ago

Add some sanity limits to throttle ping uploads

Categories

(Data Platform and Tools :: Glean: SDK, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Dexter, Assigned: brizental)

References

Details

(Whiteboard: [telemetry:glean-rs:m16])

Attachments

(1 file)

Glean is currently not preventing attempts to flood servers with pings: for example, with events, whenever we reach the maximum capacity we generate and send a new ping.

While this is currently not a problem, we might want to consider rate-limiting uploads to 1 ping type per minute or something like that.

Priority: -- → P3
Whiteboard: [telemetry:mobilesdk:m?]

(In reply to Alessio Placitelli [:Dexter] from comment #0)

While this is currently not a problem, we might want to consider rate-limiting uploads to 1 ping type per minute or something like that.

Of course this should not apply to pings sent using the GleanDebugActivity (maybe only to tagged ones?).

Whiteboard: [telemetry:mobilesdk:m?] → [telemetry:mobilesdk:backlog]
Component: Telemetry → Glean: SDK
Product: Toolkit → Data Platform and Tools
Version: Trunk → unspecified
Whiteboard: [telemetry:mobilesdk:backlog] → [telemetry:glean-rs:m?]
Whiteboard: [telemetry:glean-rs:m?] → [telemetry:glean-rs:backlog]
Depends on: 1605077
Whiteboard: [telemetry:glean-rs:backlog] → [telemetry:glean-rs:m16]
Assignee: nobody → brizental
Priority: P3 → P1

I started looking into this and I have some open questions regarding what I should take into consideration while implementing:

  • Should this throttle time be persisted? Is it a concern if the chronometer just zeroes everytime the upload manager is reinitialized?
  • I was thinking about just adding this "once per minute" limitation to the calling of get_upload_task, but that means that say upload has failed, if the client asks for a new task it will still have to wait the one minute before getting another one. I am not really sure how I could go around this in a simple manner, if it is indeed a concern.
Flags: needinfo?(alessio.placitelli)

(In reply to Beatriz Rizental from comment #2)

I started looking into this and I have some open questions regarding what I should take into consideration while implementing:

  • Should this throttle time be persisted? Is it a concern if the chronometer just zeroes everytime the upload manager is reinitialized?

What do you mean here?

  • I was thinking about just adding this "once per minute" limitation to the calling of get_upload_task, but that means that say upload has failed, if the client asks for a new task it will still have to wait the one minute before getting another one. I am not really sure how I could go around this in a simple manner, if it is indeed a concern.

Please note that what we really want to achieve is rate-limiting ping upload. You can use the Firefox rate limiting as a guidelines. We want at most 10 pings per minute.

Does this help?

Flags: needinfo?(alessio.placitelli)

(In reply to Alessio Placitelli [:Dexter] from comment #3)

(In reply to Beatriz Rizental from comment #2)

I started looking into this and I have some open questions regarding what I should take into consideration while implementing:

  • Should this throttle time be persisted? Is it a concern if the chronometer just zeroes everytime the upload manager is reinitialized?

What do you mean here?

I mean, if the client sends a ping, then closes the app, then immediatelly reopens it. Do we need to know that it just sent a ping a second ago? Or is this enough of an edge case that I can ignore it?

  • I was thinking about just adding this "once per minute" limitation to the calling of get_upload_task, but that means that say upload has failed, if the client asks for a new task it will still have to wait the one minute before getting another one. I am not really sure how I could go around this in a simple manner, if it is indeed a concern.

Please note that what we really want to achieve is rate-limiting ping upload. You can use the Firefox rate limiting as a guidelines. We want at most 10 pings per minute.

Does this help?

The example helps, yes.

(In reply to Beatriz Rizental from comment #4)

(In reply to Alessio Placitelli [:Dexter] from comment #3)

(In reply to Beatriz Rizental from comment #2)

I started looking into this and I have some open questions regarding what I should take into consideration while implementing:

  • Should this throttle time be persisted? Is it a concern if the chronometer just zeroes everytime the upload manager is reinitialized?

What do you mean here?

I mean, if the client sends a ping, then closes the app, then immediatelly reopens it. Do we need to know that it just sent a ping a second ago? Or is this enough of an edge case that I can ignore it?

No, we can ignore this edge case for now.

Attached file GitHub Pull Request
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: