Skip to content

Conversation

@KevinPoole
Copy link

@KevinPoole KevinPoole commented Apr 23, 2021

Crunchy PostgreSQL Service has services that follow the pattern of postgresql-11-odb. Seems like a reasonable assumption that the needed values in the services yaml will be the same across the versions, so chose to cover all postgresql-\d+-odb with a single pattern.

The approach for implementing ingress traffic manipulation was almost entirely copied from here:
https://wiki.linuxfoundation.org/networking/netem#how_can_i_use_netem_on_incoming_traffic

The only notes with that are:

  • One of the setup commands is sudo modprobe ifb ... leaving this module loaded seems relatively harmless compared to unloading it in the case that we were not the ones who loaded it (as in, someone/thing else is depending on it being loaded) so I opted to leave it loaded rather than try to undo that during the unmanipulate_traffic method.
  • Same deal as the above when it comes to the ifb0 interface being up. harmless to leave up, but harmful to take down if someone else is depending on it.
    • TBH, I am open to disagreement on these two points though.

Finally, I also added rate limiting via netem to the manipulate_traffic method. This should be nice since it says that the shape traffic can not happen at the same time as manipulate_traffic but this will allow the insertion of throughput limiting alongside other traffic manipulations like latency, loss, etc.

Based on the PCF release notes here: https://docs.pivotal.io/pivotalcf/2-6/pcf-release-notes/runtime-rn.html ... in newer releases, containerd is used instead of runc. I added the ability to use containerd to get a shell / execute commands on a container which can be enabled via a use-containerd entry in the config. this is disabled by default so will not effect behavior unless you choose to.

@KevinPoole KevinPoole changed the title Add Support for Crunchy PostgreSQL Service Add Support for Crunchy PostgreSQL Service and Implement Ingress Traffic Manipulation Apr 23, 2021
@KevinPoole KevinPoole changed the title Add Support for Crunchy PostgreSQL Service and Implement Ingress Traffic Manipulation Add Support for Crunchy PostgreSQL Service, Implement Ingress Traffic Manipulation, add Rate Limiting via Netem Apr 24, 2021
…mmands on containers in newer PCF installations
@KevinPoole KevinPoole changed the title Add Support for Crunchy PostgreSQL Service, Implement Ingress Traffic Manipulation, add Rate Limiting via Netem Add Support for Crunchy PostgreSQL Service, Implement Ingress Traffic Manipulation, add Rate Limiting via Netem, Option to use containerd instead of runc Apr 26, 2021
@KevinPoole
Copy link
Author

@karunchennuri let me know what you think of all of this. slightly more involved than the previous PRs, but I believe in all cases backwards compatibility is preserved and the tool is improved some.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant