Code Monkey home page Code Monkey logo

Comments (10)

 avatar commented on June 19, 2024 1

Hi @zvdbit, you can add --network host when using Ddosify in Docker. Here is an example:

docker run -it --rm --network host ddosify/ddosify ddosify -t http://localhost:8080

Ddosify can access http://localhost:8080 server.

Thanks, the --network host resolves the issue.

from anteon.

fatihbaltaci avatar fatihbaltaci commented on June 19, 2024

Hi @douglasg14b, are you using the Docker version of Ddosify?

from anteon.

douglasg14b avatar douglasg14b commented on June 19, 2024

Nope, the command line version.

from anteon.

cdong8812 avatar cdong8812 commented on June 19, 2024

same issue here using latest version, and it looks like ddosify doesn't honor keep-alive even if it is set in the config via "keep-alive": true, I am using the config based cli, even after increasing ulimit on my mac to 128k I still see the test starts failing after a short time, even with load of 10k request over 20s, it doesn't make sense to use that many connections to send so little qps, consider based on the code here: https://github.com/ddosify/ddosify/blob/master/core/scenario/requester/http.go#L434, the MaxIdleConnsPerHost is hardcoded as 60000

from anteon.

fatihbaltaci avatar fatihbaltaci commented on June 19, 2024

Hi @douglasg14b, I could not reproduce this issue.

I started a nginx server on my machine:

docker run -it --rm -p 8080:80 nginx

I can access it from a web browser with http://localhost:8080

Then I used Ddosify to test the nginx endpoint:

~ ddosify -version
Version:        v0.13.2
Git commit:     6e3511d
Built           2023-02-06T09:51:34Z
Go version:     go1.18.10
OS/Arch:        darwin/arm64

➜  ~~ ddosify -t http://localhost:8080
⚙️  Initializing...
🔥 Engine fired.

🛑 CTRL+C to gracefully stop.
✔️  Successful Run: 14     100%       ❌ Failed Run: 0        0%       ⏱️  Avg. Duration: 0.00423s
✔️  Successful Run: 29     100%       ❌ Failed Run: 0        0%       ⏱️  Avg. Duration: 0.00296s
^C✔️  Successful Run: 33     100%       ❌ Failed Run: 0        0%       ⏱️  Avg. Duration: 0.00300s


RESULT
-------------------------------------
Success Count:    33    (100%)
Failed Count:     0     (0%)

Durations (Avg):
  DNS                  :0.0000s
  Connection           :0.0000s
  Request Write        :0.0001s
  Server Processing    :0.0028s
  Response Read        :0.0001s
  Total                :0.0030s

Status Code (Message) :Count
  200 (OK)    :33

The status code is 200. Then I tried with your config file and changed the URL to nginx. Again, I did not get connection refused error.

Please give me some details of your target server to reproduce this issue. Thanks.

from anteon.

 avatar commented on June 19, 2024

Hi @douglasg14b, are you using the Docker version of Ddosify?

Hi @fatihbaltaci, apologies for sort of hijacking this issue. What would be the solution when using the Docker version?

from anteon.

fatihbaltaci avatar fatihbaltaci commented on June 19, 2024

Hi @zvdbit, you can add --network host when using Ddosify in Docker. Here is an example:

docker run -it --rm --network host ddosify/ddosify ddosify -t http://localhost:8080

Ddosify can access http://localhost:8080 server.

from anteon.

douglasg14b avatar douglasg14b commented on June 19, 2024

The target server in my case is Kestrel, a C# Asp.Net Core project ran in debug mode.

from anteon.

fatihbaltaci avatar fatihbaltaci commented on June 19, 2024

Hi @cdong8812, we released a new version of Ddosify v0.15.0. In this release:

  • We removed the keep-alive option from the config file. You can set the Connection header for each step.
  • We introduced the engine_mode option. You can set engine_mode to distinct-user in your config file if you want Ddosify to use the existing connection between steps (keep-alive) and different connections between iterations.

You can find the details in the config file section. Thanks.

from anteon.

strangedev avatar strangedev commented on June 19, 2024

FWIW, I experienced similar issues, and found that I was running out of local ports, since the default port range on linux only allows for ~28k outbound connections.

In my case, setting sysctl net.ipv4.ip_local_port_range="1024 61000" during testing helped.

from anteon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.