Freshwater ecosystems are increasingly affected by rising annual mean temperatures and extreme heatwaves. While heatwaves are expected to have more immediate effects than mean temperature increases on local communities, comparative experimental studies are largely lacking. We conducted a one-month mesocosm experiment to test the effect of different warming scenarios, constantly raised temperatures (+3°C), and recurring heatwaves (+6°C) on plankton communities. We specifically tested how shifts in zooplankton trait composition and functional groups are reflected in ecosystem functioning (top-down control on primary producers). We found that heatwaves had a stronger and more immediate effect on trait and functional group compositions. Heatwaves were associated with larger body sizes, and the decrease in micrograzers resulted in weaker top-down control, leading to elevated algal biomass. Altogether, our results highlight the importance of the indirect effects of heatwaves via inducing shifts in zooplankton functional groups and trait composition which may foster periodic algal blooms.